diff options
author | hjk <hjk121@nokiamail.com> | 2013-05-25 01:47:26 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2013-05-27 08:58:51 +0200 |
commit | cfc8ce8c1bc49a8cf865aedaef9e07dc577de768 (patch) | |
tree | 60f08b8cf9ece7c3a607627b0c7bda009a743be4 /src | |
parent | 4e75fc8c54c8cfce49112f7aa23861b53a3ed844 (diff) | |
download | qt-creator-cfc8ce8c1bc49a8cf865aedaef9e07dc577de768.tar.gz |
Remove changeEvent(QEvent::LanguageChange) implementation
This was implemented only for a small set of widgets. It's unlikely that
we will ever have or even want a dynamic language selection, until then
this code is only dead freight.
Change-Id: I1bff4e1e89057786c0e5cb57225a508c5d390d9c
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src')
52 files changed, 29 insertions, 398 deletions
diff --git a/src/libs/qmleditorwidgets/contextpanetextwidget.cpp b/src/libs/qmleditorwidgets/contextpanetextwidget.cpp index 495fa82533..5af62c4e39 100644 --- a/src/libs/qmleditorwidgets/contextpanetextwidget.cpp +++ b/src/libs/qmleditorwidgets/contextpanetextwidget.cpp @@ -398,24 +398,11 @@ void ContextPaneTextWidget::onVerticalAlignmentChanged() } } - ContextPaneTextWidget::~ContextPaneTextWidget() { delete ui; } -void ContextPaneTextWidget::changeEvent(QEvent *e) -{ - QWidget::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - void ContextPaneTextWidget::timerEvent(QTimerEvent *event) { if (event->timerId() == m_fontSizeTimer) { diff --git a/src/libs/qmleditorwidgets/contextpanetextwidget.h b/src/libs/qmleditorwidgets/contextpanetextwidget.h index b82a456157..09ff5e8c26 100644 --- a/src/libs/qmleditorwidgets/contextpanetextwidget.h +++ b/src/libs/qmleditorwidgets/contextpanetextwidget.h @@ -82,7 +82,6 @@ signals: void removeAndChangeProperty(const QString &, const QString &, const QVariant &, bool removeFirst); protected: - void changeEvent(QEvent *e); void timerEvent(QTimerEvent *event); private: diff --git a/src/libs/qmleditorwidgets/contextpanewidgetrectangle.cpp b/src/libs/qmleditorwidgets/contextpanewidgetrectangle.cpp index 1bd8924b6b..eca08408a5 100644 --- a/src/libs/qmleditorwidgets/contextpanewidgetrectangle.cpp +++ b/src/libs/qmleditorwidgets/contextpanewidgetrectangle.cpp @@ -271,18 +271,6 @@ void ContextPaneWidgetRectangle::timerEvent(QTimerEvent *event) } } -void ContextPaneWidgetRectangle::changeEvent(QEvent *e) -{ - QWidget::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - void ContextPaneWidgetRectangle::setColor() { QLinearGradient gradient; diff --git a/src/libs/qmleditorwidgets/contextpanewidgetrectangle.h b/src/libs/qmleditorwidgets/contextpanewidgetrectangle.h index 8d2ae8a08d..6d95ed0162 100644 --- a/src/libs/qmleditorwidgets/contextpanewidgetrectangle.h +++ b/src/libs/qmleditorwidgets/contextpanewidgetrectangle.h @@ -74,7 +74,6 @@ signals: void removeAndChangeProperty(const QString &, const QString &, const QVariant &, bool removeFirst); protected: - void changeEvent(QEvent *e); void timerEvent(QTimerEvent *event); private: diff --git a/src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp index 0833f6acb9..d54efe5c59 100644 --- a/src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp +++ b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp @@ -207,18 +207,6 @@ void EasingContextPane::setProperties(QmlJS::PropertyReader *propertyReader) ui->durationSpinBox->setValue(250); } -void EasingContextPane::changeEvent(QEvent *e) -{ - QWidget::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - void EasingContextPane::setGraphDisplayMode(GraphDisplayMode newMode) { m_displayMode = newMode; diff --git a/src/libs/qmleditorwidgets/easingpane/easingcontextpane.h b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.h index f2b4aa5c61..2c9316e1eb 100644 --- a/src/libs/qmleditorwidgets/easingpane/easingcontextpane.h +++ b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.h @@ -69,8 +69,6 @@ signals: void removeAndChangeProperty(const QString &, const QString &, const QVariant &, bool); protected: - void changeEvent(QEvent *e); - void setOthers(); void setLinear(); void setBack(); @@ -84,7 +82,6 @@ private: EasingSimulation *m_simulation; private slots: - void on_playButton_clicked(); void on_overshootSpinBox_valueChanged(double ); void on_periodSpinBox_valueChanged(double ); diff --git a/src/libs/utils/filewizardpage.cpp b/src/libs/utils/filewizardpage.cpp index 7b1e3c1d89..5958e9de82 100644 --- a/src/libs/utils/filewizardpage.cpp +++ b/src/libs/utils/filewizardpage.cpp @@ -92,18 +92,6 @@ void FileWizardPage::setFileName(const QString &name) d->m_ui.nameLineEdit->setText(name); } -void FileWizardPage::changeEvent(QEvent *e) -{ - QWizardPage::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - d->m_ui.retranslateUi(this); - break; - default: - break; - } -} - bool FileWizardPage::isComplete() const { return d->m_complete; diff --git a/src/libs/utils/filewizardpage.h b/src/libs/utils/filewizardpage.h index 5cad4893f9..8982acd535 100644 --- a/src/libs/utils/filewizardpage.h +++ b/src/libs/utils/filewizardpage.h @@ -74,9 +74,6 @@ private slots: void slotValidChanged(); void slotActivated(); -protected: - virtual void changeEvent(QEvent *e); - private: FileWizardPagePrivate *d; }; diff --git a/src/libs/utils/projectintropage.cpp b/src/libs/utils/projectintropage.cpp index f238a8145b..5755d0b251 100644 --- a/src/libs/utils/projectintropage.cpp +++ b/src/libs/utils/projectintropage.cpp @@ -138,18 +138,6 @@ void ProjectIntroPage::setDescription(const QString &description) d->m_ui.descriptionLabel->setText(description); } -void ProjectIntroPage::changeEvent(QEvent *e) -{ - QWizardPage::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - d->m_ui.retranslateUi(this); - break; - default: - break; - } -} - bool ProjectIntroPage::isComplete() const { return d->m_complete; diff --git a/src/libs/utils/projectintropage.h b/src/libs/utils/projectintropage.h index cb74e35494..b5520594ae 100644 --- a/src/libs/utils/projectintropage.h +++ b/src/libs/utils/projectintropage.h @@ -80,9 +80,6 @@ private slots: void slotChanged(); void slotActivated(); -protected: - virtual void changeEvent(QEvent *e); - private: enum StatusLabelMode { Error, Warning, Hint }; diff --git a/src/plugins/coreplugin/mimetypemagicdialog.cpp b/src/plugins/coreplugin/mimetypemagicdialog.cpp index 9444b9c744..5ba467e0af 100644 --- a/src/plugins/coreplugin/mimetypemagicdialog.cpp +++ b/src/plugins/coreplugin/mimetypemagicdialog.cpp @@ -45,18 +45,6 @@ MimeTypeMagicDialog::MimeTypeMagicDialog(QWidget *parent) : connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(validateAccept())); } -void MimeTypeMagicDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui.retranslateUi(this); - break; - default: - break; - } -} - void MimeTypeMagicDialog::applyRecommended(bool checked) { if (checked) { diff --git a/src/plugins/coreplugin/mimetypemagicdialog.h b/src/plugins/coreplugin/mimetypemagicdialog.h index 24673bf16e..b2cced8046 100644 --- a/src/plugins/coreplugin/mimetypemagicdialog.h +++ b/src/plugins/coreplugin/mimetypemagicdialog.h @@ -62,9 +62,6 @@ public: void setMagicData(const MagicData &data); MagicData magicData() const; -protected: - void changeEvent(QEvent *e); - private slots: void applyRecommended(bool checked); void validateAccept(); diff --git a/src/plugins/coreplugin/removefiledialog.cpp b/src/plugins/coreplugin/removefiledialog.cpp index bf72c6e120..c643ad5be3 100644 --- a/src/plugins/coreplugin/removefiledialog.cpp +++ b/src/plugins/coreplugin/removefiledialog.cpp @@ -59,15 +59,3 @@ bool RemoveFileDialog::isDeleteFileChecked() const { return m_ui->deleteFileCheckBox->isChecked(); } - -void RemoveFileDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - m_ui->retranslateUi(this); - break; - default: - break; - } -} diff --git a/src/plugins/coreplugin/removefiledialog.h b/src/plugins/coreplugin/removefiledialog.h index 9f5c6edb6e..ebe5c86bec 100644 --- a/src/plugins/coreplugin/removefiledialog.h +++ b/src/plugins/coreplugin/removefiledialog.h @@ -51,9 +51,6 @@ public: void setDeleteFileVisible(bool visible); bool isDeleteFileChecked() const; -protected: - virtual void changeEvent(QEvent *e); - private: Ui::RemoveFileDialog *m_ui; }; diff --git a/src/plugins/git/branchdialog.cpp b/src/plugins/git/branchdialog.cpp index 40574ef1c5..2c7dca4b28 100644 --- a/src/plugins/git/branchdialog.cpp +++ b/src/plugins/git/branchdialog.cpp @@ -312,18 +312,6 @@ void BranchDialog::rebase() stashGuard.preventPop(); } -void BranchDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - m_ui->retranslateUi(this); - break; - default: - break; - } -} - QModelIndex BranchDialog::selectedIndex() { QModelIndexList selected = m_ui->branchView->selectionModel()->selectedIndexes(); diff --git a/src/plugins/git/branchdialog.h b/src/plugins/git/branchdialog.h index 34afa8aa55..c1b38ac619 100644 --- a/src/plugins/git/branchdialog.h +++ b/src/plugins/git/branchdialog.h @@ -33,7 +33,6 @@ #include <QDialog> QT_BEGIN_NAMESPACE -class QPushButton; class QModelIndex; QT_END_NAMESPACE @@ -52,7 +51,8 @@ class BranchModel; * branches below. Offers to checkout/delete local branches. * */ -class BranchDialog : public QDialog { +class BranchDialog : public QDialog +{ Q_OBJECT public: @@ -74,16 +74,11 @@ private slots: void merge(); void rebase(); -protected: - void changeEvent(QEvent *e); - private: QModelIndex selectedIndex(); Ui::BranchDialog *m_ui; - BranchModel *m_model; - QString m_repository; }; diff --git a/src/plugins/git/gitorious/gitorioushostwidget.cpp b/src/plugins/git/gitorious/gitorioushostwidget.cpp index 22622f1a70..4c67c425a8 100644 --- a/src/plugins/git/gitorious/gitorioushostwidget.cpp +++ b/src/plugins/git/gitorious/gitorioushostwidget.cpp @@ -297,17 +297,5 @@ void GitoriousHostWidget::slotError(const QString &e) m_errorClearTimer->start(); } -void GitoriousHostWidget::changeEvent(QEvent *e) -{ - QWidget::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - } // namespace Internal } // namespace Gitorious diff --git a/src/plugins/git/gitorious/gitorioushostwidget.h b/src/plugins/git/gitorious/gitorioushostwidget.h index c00cd07dcb..a96f564cae 100644 --- a/src/plugins/git/gitorious/gitorioushostwidget.h +++ b/src/plugins/git/gitorious/gitorioushostwidget.h @@ -54,8 +54,10 @@ namespace Ui { * it receives the projects. As soon as there are projects, isValid() becomes * true. */ -class GitoriousHostWidget : public QWidget { +class GitoriousHostWidget : public QWidget +{ Q_OBJECT + public: GitoriousHostWidget(QWidget *parent = 0); ~GitoriousHostWidget(); @@ -72,9 +74,6 @@ signals: public slots: void selectRow(int); -protected: - void changeEvent(QEvent *e); - private slots: void slotBrowse(); void slotDelete(); diff --git a/src/plugins/git/gitorious/gitoriousprojectwidget.cpp b/src/plugins/git/gitorious/gitoriousprojectwidget.cpp index b374910f0e..6c7d128dbb 100644 --- a/src/plugins/git/gitorious/gitoriousprojectwidget.cpp +++ b/src/plugins/git/gitorious/gitoriousprojectwidget.cpp @@ -281,17 +281,5 @@ QSharedPointer<GitoriousProject> GitoriousProjectWidget::project() const return QSharedPointer<GitoriousProject>(new GitoriousProject); } -void GitoriousProjectWidget::changeEvent(QEvent *e) -{ - QWidget::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - } // namespace Internal } // namespace Gitorious diff --git a/src/plugins/git/gitorious/gitoriousprojectwidget.h b/src/plugins/git/gitorious/gitoriousprojectwidget.h index b9dc642235..b55aaacf10 100644 --- a/src/plugins/git/gitorious/gitoriousprojectwidget.h +++ b/src/plugins/git/gitorious/gitoriousprojectwidget.h @@ -56,8 +56,10 @@ namespace Ui { * it receives the projects. isValid() and signal validChanged are * provided for use in a QWizardPage. Host matching happens via name as the * hostIndex might change due to deleting hosts. */ -class GitoriousProjectWidget : public QWidget { +class GitoriousProjectWidget : public QWidget +{ Q_OBJECT + public: explicit GitoriousProjectWidget(int hostIndex, QWidget *parent = 0); @@ -91,9 +93,6 @@ private slots: void slotUpdateProjects(int hostIndex); void slotUpdateCheckBoxChanged(int); -protected: - void changeEvent(QEvent *e); - private: QStandardItem *itemFromIndex(const QModelIndex &idx) const; QStandardItem *currentItem() const; @@ -107,7 +106,7 @@ private: bool m_valid; }; - } // namespace Internal } // namespace Gitorious + #endif // GITORIOUSPROJECTWIDGET_H diff --git a/src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp b/src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp index da6ecd25ea..d90719e5c2 100644 --- a/src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp +++ b/src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp @@ -237,17 +237,5 @@ bool GitoriousRepositoryWizardPage::isComplete() const return m_valid; } -void GitoriousRepositoryWizardPage::changeEvent(QEvent *e) -{ - QWizardPage::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - } // namespace Internal } // namespace Gitorious diff --git a/src/plugins/git/gitorious/gitoriousrepositorywizardpage.h b/src/plugins/git/gitorious/gitoriousrepositorywizardpage.h index be6b4d3953..647887a933 100644 --- a/src/plugins/git/gitorious/gitoriousrepositorywizardpage.h +++ b/src/plugins/git/gitorious/gitoriousrepositorywizardpage.h @@ -51,8 +51,10 @@ namespace Ui { // A wizard page listing Gitorious repositories in a tree, by repository type. -class GitoriousRepositoryWizardPage : public QWizardPage { +class GitoriousRepositoryWizardPage : public QWizardPage +{ Q_OBJECT + public: explicit GitoriousRepositoryWizardPage(const GitoriousProjectWizardPage *projectPage, QWidget *parent = 0); @@ -67,9 +69,6 @@ public: public slots: void slotCurrentChanged(const QModelIndex ¤t, const QModelIndex &previous); -protected: - void changeEvent(QEvent *e); - private: // return the repository (column 0) item. QStandardItem *currentItem0() const; diff --git a/src/plugins/git/remotedialog.cpp b/src/plugins/git/remotedialog.cpp index 4488719f73..a027d62bf2 100644 --- a/src/plugins/git/remotedialog.cpp +++ b/src/plugins/git/remotedialog.cpp @@ -198,17 +198,5 @@ void RemoteDialog::updateButtonState() m_ui->removeButton->setEnabled(haveSelection); } -void RemoteDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - m_ui->retranslateUi(this); - break; - default: - break; - } -} - } // namespace Internal } // namespace Git diff --git a/src/plugins/git/remotedialog.h b/src/plugins/git/remotedialog.h index 92ecdbdc94..7a8d00900b 100644 --- a/src/plugins/git/remotedialog.h +++ b/src/plugins/git/remotedialog.h @@ -68,7 +68,8 @@ private: // RemoteDialog: // -------------------------------------------------------------------------- -class RemoteDialog : public QDialog { +class RemoteDialog : public QDialog +{ Q_OBJECT public: @@ -86,11 +87,6 @@ public slots: void updateButtonState(); -private slots: - -protected: - void changeEvent(QEvent *e); - private: Ui::RemoteDialog *m_ui; diff --git a/src/plugins/git/stashdialog.cpp b/src/plugins/git/stashdialog.cpp index 1447230d39..137a6ed921 100644 --- a/src/plugins/git/stashdialog.cpp +++ b/src/plugins/git/stashdialog.cpp @@ -150,18 +150,6 @@ StashDialog::~StashDialog() delete ui; } -void StashDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - QString StashDialog::msgRepositoryLabel(const QString &repository) { return repository.isEmpty() ? diff --git a/src/plugins/git/stashdialog.h b/src/plugins/git/stashdialog.h index 37bfc77592..15f24fc04b 100644 --- a/src/plugins/git/stashdialog.h +++ b/src/plugins/git/stashdialog.h @@ -51,8 +51,10 @@ class StashModel; * (in case restore fails due to conflicts) on current and * delete on selection/all. */ -class StashDialog : public QDialog { +class StashDialog : public QDialog +{ Q_OBJECT + public: explicit StashDialog(QWidget *parent = 0); ~StashDialog(); @@ -62,9 +64,6 @@ public: public slots: void refresh(const QString &repository, bool force); -protected: - void changeEvent(QEvent *e); - private slots: void deleteAll(); void deleteSelection(); diff --git a/src/plugins/mercurial/revertdialog.cpp b/src/plugins/mercurial/revertdialog.cpp index 2137140361..16b5dc06f9 100644 --- a/src/plugins/mercurial/revertdialog.cpp +++ b/src/plugins/mercurial/revertdialog.cpp @@ -43,18 +43,6 @@ RevertDialog::~RevertDialog() delete m_ui; } -void RevertDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - m_ui->retranslateUi(this); - break; - default: - break; - } -} - QString RevertDialog::revision() const { return m_ui->revisionLineEdit->text(); diff --git a/src/plugins/mercurial/revertdialog.h b/src/plugins/mercurial/revertdialog.h index 77a5d0a132..ce9520b57d 100644 --- a/src/plugins/mercurial/revertdialog.h +++ b/src/plugins/mercurial/revertdialog.h @@ -47,9 +47,6 @@ public: QString revision() const; -protected: - void changeEvent(QEvent *e); - private: Ui::RevertDialog *m_ui; }; diff --git a/src/plugins/mercurial/srcdestdialog.cpp b/src/plugins/mercurial/srcdestdialog.cpp index 3d80f7215b..7ca9056545 100644 --- a/src/plugins/mercurial/srcdestdialog.cpp +++ b/src/plugins/mercurial/srcdestdialog.cpp @@ -59,15 +59,3 @@ QString SrcDestDialog::getRepositoryString() const return m_ui->localPathChooser->path(); return m_ui->urlLineEdit->text(); } - -void SrcDestDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - m_ui->retranslateUi(this); - break; - default: - break; - } -} diff --git a/src/plugins/mercurial/srcdestdialog.h b/src/plugins/mercurial/srcdestdialog.h index a9e70c14a3..ffe42d0422 100644 --- a/src/plugins/mercurial/srcdestdialog.h +++ b/src/plugins/mercurial/srcdestdialog.h @@ -45,12 +45,10 @@ class SrcDestDialog : public QDialog public: SrcDestDialog(QWidget *parent = 0); ~SrcDestDialog(); + void setPathChooserKind(Utils::PathChooser::Kind kind); QString getRepositoryString() const; -protected: - void changeEvent(QEvent *e); - private: Ui::SrcDestDialog *m_ui; }; diff --git a/src/plugins/projectexplorer/doubletabwidget.cpp b/src/plugins/projectexplorer/doubletabwidget.cpp index 0e467de3e0..08bd1eb0dc 100644 --- a/src/plugins/projectexplorer/doubletabwidget.cpp +++ b/src/plugins/projectexplorer/doubletabwidget.cpp @@ -503,18 +503,6 @@ void DoubleTabWidget::paintEvent(QPaintEvent *event) } } -void DoubleTabWidget::changeEvent(QEvent *e) -{ - QWidget::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - bool DoubleTabWidget::event(QEvent *event) { if (event->type() == QEvent::ToolTip) { diff --git a/src/plugins/projectexplorer/doubletabwidget.h b/src/plugins/projectexplorer/doubletabwidget.h index 7d60b3d10c..a7ce2d9da6 100644 --- a/src/plugins/projectexplorer/doubletabwidget.h +++ b/src/plugins/projectexplorer/doubletabwidget.h @@ -67,7 +67,6 @@ signals: protected: void paintEvent(QPaintEvent *event); void mousePressEvent(QMouseEvent *event); - void changeEvent(QEvent *e); bool event(QEvent *event); QSize minimumSizeHint() const; diff --git a/src/plugins/projectexplorer/projectwizardpage.cpp b/src/plugins/projectexplorer/projectwizardpage.cpp index c6c4b3edac..d6d4df0631 100644 --- a/src/plugins/projectexplorer/projectwizardpage.cpp +++ b/src/plugins/projectexplorer/projectwizardpage.cpp @@ -127,18 +127,6 @@ void ProjectWizardPage::setVersionControlIndex(int idx) m_ui->addToVersionControlComboBox->setCurrentIndex(idx); } -void ProjectWizardPage::changeEvent(QEvent *e) -{ - QWizardPage::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - m_ui->retranslateUi(this); - break; - default: - break; - } -} - // Alphabetically, and files in sub-directories first static bool generatedFilePathLessThan(const QString &filePath1, const QString &filePath2) { diff --git a/src/plugins/projectexplorer/projectwizardpage.h b/src/plugins/projectexplorer/projectwizardpage.h index f10224753e..657dc4fa47 100644 --- a/src/plugins/projectexplorer/projectwizardpage.h +++ b/src/plugins/projectexplorer/projectwizardpage.h @@ -69,15 +69,12 @@ public: void setProjectComoBoxVisible(bool visible); -protected: - virtual void changeEvent(QEvent *e); - private slots: void slotProjectChanged(int); void slotManageVcs(); private: - inline void setProjectToolTip(const QString &); + void setProjectToolTip(const QString &); Ui::WizardPage *m_ui; QStringList m_projectToolTips; diff --git a/src/plugins/projectexplorer/targetsettingswidget.cpp b/src/plugins/projectexplorer/targetsettingswidget.cpp index 7e28a0126c..88c53616a0 100644 --- a/src/plugins/projectexplorer/targetsettingswidget.cpp +++ b/src/plugins/projectexplorer/targetsettingswidget.cpp @@ -147,15 +147,3 @@ int TargetSettingsWidget::currentSubIndex() const { return m_targetSelector->currentSubIndex(); } - -void TargetSettingsWidget::changeEvent(QEvent *e) -{ - QWidget::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} diff --git a/src/plugins/projectexplorer/targetsettingswidget.h b/src/plugins/projectexplorer/targetsettingswidget.h index c48fa5ad49..1b678c4a20 100644 --- a/src/plugins/projectexplorer/targetsettingswidget.h +++ b/src/plugins/projectexplorer/targetsettingswidget.h @@ -49,6 +49,7 @@ namespace Ui { class TargetSettingsWidget : public QWidget { Q_OBJECT + public: explicit TargetSettingsWidget(QWidget *parent = 0); ~TargetSettingsWidget(); @@ -77,9 +78,6 @@ signals: void toolTipRequested(const QPoint &globalPosition, int targetIndex); void menuShown(int targetIndex); -protected: - void changeEvent(QEvent *e); - private: Ui::TargetSettingsWidget *ui; diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp index bf2342bb35..910a145e74 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp +++ b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp @@ -138,17 +138,5 @@ bool CustomWidgetPluginWizardPage::isComplete() const return m_complete; } -void CustomWidgetPluginWizardPage::changeEvent(QEvent *e) -{ - QWizardPage::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - m_ui->retranslateUi(this); - break; - default: - break; - } -} - } // namespace Internal } // namespace Qt4ProjectManager diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.h b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.h index a807be36c1..1605b2a507 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.h +++ b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetpluginwizardpage.h @@ -45,8 +45,10 @@ namespace Ui { class CustomWidgetPluginWizardPage; } -class CustomWidgetPluginWizardPage : public QWizardPage { +class CustomWidgetPluginWizardPage : public QWizardPage +{ Q_OBJECT + public: explicit CustomWidgetPluginWizardPage(QWidget *parent = 0); virtual ~CustomWidgetPluginWizardPage(); @@ -61,9 +63,6 @@ public: // Fills the plugin fields, excluding widget list. QSharedPointer<PluginOptions> basicPluginOptions() const; -protected: - void changeEvent(QEvent *e); - private slots: void on_collectionClassEdit_textChanged(); void on_collectionHeaderEdit_textChanged(); @@ -82,4 +81,5 @@ private: } // namespace Internal } // namespace Qt4ProjectManager + #endif // CUSTOMWIDGETPLUGINWIZARDPAGE_H diff --git a/src/plugins/qt4projectmanager/wizards/testwizardpage.cpp b/src/plugins/qt4projectmanager/wizards/testwizardpage.cpp index c9d2de1af8..f1f211370b 100644 --- a/src/plugins/qt4projectmanager/wizards/testwizardpage.cpp +++ b/src/plugins/qt4projectmanager/wizards/testwizardpage.cpp @@ -133,17 +133,5 @@ void TestWizardPage::slotUpdateValid() } } -void TestWizardPage::changeEvent(QEvent *e) -{ - QWizardPage::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - } // namespace Internal } // namespace Qt4ProjectManager diff --git a/src/plugins/qt4projectmanager/wizards/testwizardpage.h b/src/plugins/qt4projectmanager/wizards/testwizardpage.h index 960043e846..69b0ae77b4 100644 --- a/src/plugins/qt4projectmanager/wizards/testwizardpage.h +++ b/src/plugins/qt4projectmanager/wizards/testwizardpage.h @@ -44,8 +44,10 @@ struct TestWizardParameters; /* TestWizardPage: Let's the user input test class name, slot * (for which a CLassNameValidatingLineEdit is abused) and file name. */ -class TestWizardPage : public QWizardPage { +class TestWizardPage : public QWizardPage +{ Q_OBJECT + public: explicit TestWizardPage(QWidget *parent = 0); ~TestWizardPage(); @@ -62,18 +64,15 @@ private slots: void slotFileNameEdited(); void slotUpdateValid(); -protected: - void changeEvent(QEvent *e); - private: const QString m_sourceSuffix; const bool m_lowerCaseFileNames; Ui::TestWizardPage *ui; bool m_fileNameEdited; bool m_valid; - }; } // namespace Internal } // namespace Qt4ProjectManager + #endif // TESTWIZARDPAGE_H diff --git a/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.cpp b/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.cpp index 2267f4e548..6c1f3454dd 100644 --- a/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.cpp +++ b/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.cpp @@ -136,15 +136,3 @@ void ManageDefinitionsDialog::invertSelection() ui.definitionsTable->selectionModel()->select(itemSelection, QItemSelectionModel::Toggle); ui.definitionsTable->setFocus(); } - -void ManageDefinitionsDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui.retranslateUi(this); - break; - default: - break; - } -} diff --git a/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.h b/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.h index af24f12b81..054c4eb7c7 100644 --- a/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.h +++ b/src/plugins/texteditor/generichighlighter/managedefinitionsdialog.h @@ -41,14 +41,12 @@ namespace Internal { class ManageDefinitionsDialog : public QDialog { Q_OBJECT + public: explicit ManageDefinitionsDialog(const QList<HighlightDefinitionMetaData> &metaDataList, const QString &path, QWidget *parent = 0); -protected: - void changeEvent(QEvent *e); - private slots: void downloadDefinitions(); void selectAll(); diff --git a/src/plugins/texteditor/tabsettingswidget.cpp b/src/plugins/texteditor/tabsettingswidget.cpp index 428f76250c..2ce5756437 100644 --- a/src/plugins/texteditor/tabsettingswidget.cpp +++ b/src/plugins/texteditor/tabsettingswidget.cpp @@ -121,16 +121,4 @@ void TabSettingsWidget::setCodingStyleWarningVisible(bool visible) ui->codingStyleWarning->setVisible(visible); } -void TabSettingsWidget::changeEvent(QEvent *e) -{ - QWidget::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - } // namespace TextEditor diff --git a/src/plugins/texteditor/tabsettingswidget.h b/src/plugins/texteditor/tabsettingswidget.h index d4074ba589..802a7933ca 100644 --- a/src/plugins/texteditor/tabsettingswidget.h +++ b/src/plugins/texteditor/tabsettingswidget.h @@ -66,9 +66,6 @@ signals: void settingsChanged(const TextEditor::TabSettings &); void codingStyleLinkClicked(TextEditor::TabSettingsWidget::CodingStyleLink link); -protected: - void changeEvent(QEvent *e); - private slots: void slotSettingsChanged(); void codingStyleLinkActivated(const QString &linkString); diff --git a/src/plugins/vcsbase/basecheckoutwizardpage.cpp b/src/plugins/vcsbase/basecheckoutwizardpage.cpp index efceff420f..9091829b26 100644 --- a/src/plugins/vcsbase/basecheckoutwizardpage.cpp +++ b/src/plugins/vcsbase/basecheckoutwizardpage.cpp @@ -230,18 +230,6 @@ void BaseCheckoutWizardPage::slotDirectoryEdited() slotChanged(); } -void BaseCheckoutWizardPage::changeEvent(QEvent *e) -{ - QWizardPage::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - d->ui.retranslateUi(this); - break; - default: - break; - } -} - bool BaseCheckoutWizardPage::isComplete() const { return d->m_valid; diff --git a/src/plugins/vcsbase/basecheckoutwizardpage.h b/src/plugins/vcsbase/basecheckoutwizardpage.h index 70cb25bd54..d68293d4ac 100644 --- a/src/plugins/vcsbase/basecheckoutwizardpage.h +++ b/src/plugins/vcsbase/basecheckoutwizardpage.h @@ -75,8 +75,6 @@ public: bool isBranchSelectorVisible() const; protected: - void changeEvent(QEvent *e); - void setRepositoryLabel(const QString &l); void setDirectoryVisible(bool v); void setBranchSelectorVisible(bool v); diff --git a/src/plugins/vcsbase/checkoutprogresswizardpage.cpp b/src/plugins/vcsbase/checkoutprogresswizardpage.cpp index 4b44a905da..02be689821 100644 --- a/src/plugins/vcsbase/checkoutprogresswizardpage.cpp +++ b/src/plugins/vcsbase/checkoutprogresswizardpage.cpp @@ -124,17 +124,5 @@ bool CheckoutProgressWizardPage::isComplete() const return m_state == Succeeded; } -void CheckoutProgressWizardPage::changeEvent(QEvent *e) -{ - QWizardPage::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - } // namespace Internal } // namespace VcsBase diff --git a/src/plugins/vcsbase/checkoutprogresswizardpage.h b/src/plugins/vcsbase/checkoutprogresswizardpage.h index fde7a6e784..87136507ed 100644 --- a/src/plugins/vcsbase/checkoutprogresswizardpage.h +++ b/src/plugins/vcsbase/checkoutprogresswizardpage.h @@ -64,9 +64,6 @@ private slots: void slotFailed(const QString &); void slotSucceeded(); -protected: - void changeEvent(QEvent *e); - private: Ui::CheckoutProgressWizardPage *ui; QSharedPointer<AbstractCheckoutJob> m_job; diff --git a/src/plugins/vcsbase/cleandialog.cpp b/src/plugins/vcsbase/cleandialog.cpp index fd921e2e2f..ed8a46bd78 100644 --- a/src/plugins/vcsbase/cleandialog.cpp +++ b/src/plugins/vcsbase/cleandialog.cpp @@ -308,18 +308,6 @@ void CleanDialog::updateSelectAllCheckBox() } } -void CleanDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - d->ui.retranslateUi(this); - break; - default: - break; - } -} - } // namespace VcsBase #include "cleandialog.moc" diff --git a/src/plugins/vcsbase/cleandialog.h b/src/plugins/vcsbase/cleandialog.h index 374131d087..4078030c8f 100644 --- a/src/plugins/vcsbase/cleandialog.h +++ b/src/plugins/vcsbase/cleandialog.h @@ -55,9 +55,6 @@ public: public slots: void accept(); -protected: - void changeEvent(QEvent *e); - private slots: void slotDoubleClicked(const QModelIndex &); void selectAllItems(bool checked); diff --git a/src/plugins/vcsbase/submiteditorwidget.cpp b/src/plugins/vcsbase/submiteditorwidget.cpp index 2ceb8770bc..928a8110f2 100644 --- a/src/plugins/vcsbase/submiteditorwidget.cpp +++ b/src/plugins/vcsbase/submiteditorwidget.cpp @@ -517,18 +517,6 @@ QString SubmitEditorWidget::cleanupDescription(const QString &input) const return input; } -void SubmitEditorWidget::changeEvent(QEvent *e) -{ - QWidget::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - d->m_ui.retranslateUi(this); - break; - default: - break; - } -} - void SubmitEditorWidget::insertTopWidget(QWidget *w) { d->m_ui.vboxLayout->insertWidget(0, w); diff --git a/src/plugins/vcsbase/submiteditorwidget.h b/src/plugins/vcsbase/submiteditorwidget.h index 1da9e9cd57..7860eb42c0 100644 --- a/src/plugins/vcsbase/submiteditorwidget.h +++ b/src/plugins/vcsbase/submiteditorwidget.h @@ -119,7 +119,6 @@ private slots: protected: virtual QString cleanupDescription(const QString &) const; - virtual void changeEvent(QEvent *e); virtual QString commitName() const; void insertTopWidget(QWidget *w); void hideDescription(); |