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>
This commit is contained in:
hjk
2013-05-25 01:47:26 +02:00
parent 4e75fc8c54
commit cfc8ce8c1b
52 changed files with 29 additions and 398 deletions

View File

@@ -398,24 +398,11 @@ void ContextPaneTextWidget::onVerticalAlignmentChanged()
} }
} }
ContextPaneTextWidget::~ContextPaneTextWidget() ContextPaneTextWidget::~ContextPaneTextWidget()
{ {
delete ui; 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) void ContextPaneTextWidget::timerEvent(QTimerEvent *event)
{ {
if (event->timerId() == m_fontSizeTimer) { if (event->timerId() == m_fontSizeTimer) {

View File

@@ -82,7 +82,6 @@ signals:
void removeAndChangeProperty(const QString &, const QString &, const QVariant &, bool removeFirst); void removeAndChangeProperty(const QString &, const QString &, const QVariant &, bool removeFirst);
protected: protected:
void changeEvent(QEvent *e);
void timerEvent(QTimerEvent *event); void timerEvent(QTimerEvent *event);
private: private:

View File

@@ -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() void ContextPaneWidgetRectangle::setColor()
{ {
QLinearGradient gradient; QLinearGradient gradient;

View File

@@ -74,7 +74,6 @@ signals:
void removeAndChangeProperty(const QString &, const QString &, const QVariant &, bool removeFirst); void removeAndChangeProperty(const QString &, const QString &, const QVariant &, bool removeFirst);
protected: protected:
void changeEvent(QEvent *e);
void timerEvent(QTimerEvent *event); void timerEvent(QTimerEvent *event);
private: private:

View File

@@ -207,18 +207,6 @@ void EasingContextPane::setProperties(QmlJS::PropertyReader *propertyReader)
ui->durationSpinBox->setValue(250); 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) void EasingContextPane::setGraphDisplayMode(GraphDisplayMode newMode)
{ {
m_displayMode = newMode; m_displayMode = newMode;

View File

@@ -69,8 +69,6 @@ signals:
void removeAndChangeProperty(const QString &, const QString &, const QVariant &, bool); void removeAndChangeProperty(const QString &, const QString &, const QVariant &, bool);
protected: protected:
void changeEvent(QEvent *e);
void setOthers(); void setOthers();
void setLinear(); void setLinear();
void setBack(); void setBack();
@@ -84,7 +82,6 @@ private:
EasingSimulation *m_simulation; EasingSimulation *m_simulation;
private slots: private slots:
void on_playButton_clicked(); void on_playButton_clicked();
void on_overshootSpinBox_valueChanged(double ); void on_overshootSpinBox_valueChanged(double );
void on_periodSpinBox_valueChanged(double ); void on_periodSpinBox_valueChanged(double );

View File

@@ -92,18 +92,6 @@ void FileWizardPage::setFileName(const QString &name)
d->m_ui.nameLineEdit->setText(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 bool FileWizardPage::isComplete() const
{ {
return d->m_complete; return d->m_complete;

View File

@@ -74,9 +74,6 @@ private slots:
void slotValidChanged(); void slotValidChanged();
void slotActivated(); void slotActivated();
protected:
virtual void changeEvent(QEvent *e);
private: private:
FileWizardPagePrivate *d; FileWizardPagePrivate *d;
}; };

View File

@@ -138,18 +138,6 @@ void ProjectIntroPage::setDescription(const QString &description)
d->m_ui.descriptionLabel->setText(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 bool ProjectIntroPage::isComplete() const
{ {
return d->m_complete; return d->m_complete;

View File

@@ -80,9 +80,6 @@ private slots:
void slotChanged(); void slotChanged();
void slotActivated(); void slotActivated();
protected:
virtual void changeEvent(QEvent *e);
private: private:
enum StatusLabelMode { Error, Warning, Hint }; enum StatusLabelMode { Error, Warning, Hint };

View File

@@ -45,18 +45,6 @@ MimeTypeMagicDialog::MimeTypeMagicDialog(QWidget *parent) :
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(validateAccept())); 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) void MimeTypeMagicDialog::applyRecommended(bool checked)
{ {
if (checked) { if (checked) {

View File

@@ -62,9 +62,6 @@ public:
void setMagicData(const MagicData &data); void setMagicData(const MagicData &data);
MagicData magicData() const; MagicData magicData() const;
protected:
void changeEvent(QEvent *e);
private slots: private slots:
void applyRecommended(bool checked); void applyRecommended(bool checked);
void validateAccept(); void validateAccept();

View File

@@ -59,15 +59,3 @@ bool RemoveFileDialog::isDeleteFileChecked() const
{ {
return m_ui->deleteFileCheckBox->isChecked(); 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;
}
}

View File

@@ -51,9 +51,6 @@ public:
void setDeleteFileVisible(bool visible); void setDeleteFileVisible(bool visible);
bool isDeleteFileChecked() const; bool isDeleteFileChecked() const;
protected:
virtual void changeEvent(QEvent *e);
private: private:
Ui::RemoveFileDialog *m_ui; Ui::RemoveFileDialog *m_ui;
}; };

View File

@@ -312,18 +312,6 @@ void BranchDialog::rebase()
stashGuard.preventPop(); 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() QModelIndex BranchDialog::selectedIndex()
{ {
QModelIndexList selected = m_ui->branchView->selectionModel()->selectedIndexes(); QModelIndexList selected = m_ui->branchView->selectionModel()->selectedIndexes();

View File

@@ -33,7 +33,6 @@
#include <QDialog> #include <QDialog>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QPushButton;
class QModelIndex; class QModelIndex;
QT_END_NAMESPACE QT_END_NAMESPACE
@@ -52,7 +51,8 @@ class BranchModel;
* branches below. Offers to checkout/delete local branches. * branches below. Offers to checkout/delete local branches.
* *
*/ */
class BranchDialog : public QDialog { class BranchDialog : public QDialog
{
Q_OBJECT Q_OBJECT
public: public:
@@ -74,16 +74,11 @@ private slots:
void merge(); void merge();
void rebase(); void rebase();
protected:
void changeEvent(QEvent *e);
private: private:
QModelIndex selectedIndex(); QModelIndex selectedIndex();
Ui::BranchDialog *m_ui; Ui::BranchDialog *m_ui;
BranchModel *m_model; BranchModel *m_model;
QString m_repository; QString m_repository;
}; };

View File

@@ -297,17 +297,5 @@ void GitoriousHostWidget::slotError(const QString &e)
m_errorClearTimer->start(); 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 Internal
} // namespace Gitorious } // namespace Gitorious

View File

@@ -54,8 +54,10 @@ namespace Ui {
* it receives the projects. As soon as there are projects, isValid() becomes * it receives the projects. As soon as there are projects, isValid() becomes
* true. */ * true. */
class GitoriousHostWidget : public QWidget { class GitoriousHostWidget : public QWidget
{
Q_OBJECT Q_OBJECT
public: public:
GitoriousHostWidget(QWidget *parent = 0); GitoriousHostWidget(QWidget *parent = 0);
~GitoriousHostWidget(); ~GitoriousHostWidget();
@@ -72,9 +74,6 @@ signals:
public slots: public slots:
void selectRow(int); void selectRow(int);
protected:
void changeEvent(QEvent *e);
private slots: private slots:
void slotBrowse(); void slotBrowse();
void slotDelete(); void slotDelete();

View File

@@ -281,17 +281,5 @@ QSharedPointer<GitoriousProject> GitoriousProjectWidget::project() const
return QSharedPointer<GitoriousProject>(new GitoriousProject); 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 Internal
} // namespace Gitorious } // namespace Gitorious

View File

@@ -56,8 +56,10 @@ namespace Ui {
* it receives the projects. isValid() and signal validChanged are * it receives the projects. isValid() and signal validChanged are
* provided for use in a QWizardPage. Host matching happens via name as the * provided for use in a QWizardPage. Host matching happens via name as the
* hostIndex might change due to deleting hosts. */ * hostIndex might change due to deleting hosts. */
class GitoriousProjectWidget : public QWidget { class GitoriousProjectWidget : public QWidget
{
Q_OBJECT Q_OBJECT
public: public:
explicit GitoriousProjectWidget(int hostIndex, explicit GitoriousProjectWidget(int hostIndex,
QWidget *parent = 0); QWidget *parent = 0);
@@ -91,9 +93,6 @@ private slots:
void slotUpdateProjects(int hostIndex); void slotUpdateProjects(int hostIndex);
void slotUpdateCheckBoxChanged(int); void slotUpdateCheckBoxChanged(int);
protected:
void changeEvent(QEvent *e);
private: private:
QStandardItem *itemFromIndex(const QModelIndex &idx) const; QStandardItem *itemFromIndex(const QModelIndex &idx) const;
QStandardItem *currentItem() const; QStandardItem *currentItem() const;
@@ -107,7 +106,7 @@ private:
bool m_valid; bool m_valid;
}; };
} // namespace Internal } // namespace Internal
} // namespace Gitorious } // namespace Gitorious
#endif // GITORIOUSPROJECTWIDGET_H #endif // GITORIOUSPROJECTWIDGET_H

View File

@@ -237,17 +237,5 @@ bool GitoriousRepositoryWizardPage::isComplete() const
return m_valid; 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 Internal
} // namespace Gitorious } // namespace Gitorious

View File

@@ -51,8 +51,10 @@ namespace Ui {
// A wizard page listing Gitorious repositories in a tree, by repository type. // A wizard page listing Gitorious repositories in a tree, by repository type.
class GitoriousRepositoryWizardPage : public QWizardPage { class GitoriousRepositoryWizardPage : public QWizardPage
{
Q_OBJECT Q_OBJECT
public: public:
explicit GitoriousRepositoryWizardPage(const GitoriousProjectWizardPage *projectPage, explicit GitoriousRepositoryWizardPage(const GitoriousProjectWizardPage *projectPage,
QWidget *parent = 0); QWidget *parent = 0);
@@ -67,9 +69,6 @@ public:
public slots: public slots:
void slotCurrentChanged(const QModelIndex &current, const QModelIndex &previous); void slotCurrentChanged(const QModelIndex &current, const QModelIndex &previous);
protected:
void changeEvent(QEvent *e);
private: private:
// return the repository (column 0) item. // return the repository (column 0) item.
QStandardItem *currentItem0() const; QStandardItem *currentItem0() const;

View File

@@ -198,17 +198,5 @@ void RemoteDialog::updateButtonState()
m_ui->removeButton->setEnabled(haveSelection); 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 Internal
} // namespace Git } // namespace Git

View File

@@ -68,7 +68,8 @@ private:
// RemoteDialog: // RemoteDialog:
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
class RemoteDialog : public QDialog { class RemoteDialog : public QDialog
{
Q_OBJECT Q_OBJECT
public: public:
@@ -86,11 +87,6 @@ public slots:
void updateButtonState(); void updateButtonState();
private slots:
protected:
void changeEvent(QEvent *e);
private: private:
Ui::RemoteDialog *m_ui; Ui::RemoteDialog *m_ui;

View File

@@ -150,18 +150,6 @@ StashDialog::~StashDialog()
delete ui; 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) QString StashDialog::msgRepositoryLabel(const QString &repository)
{ {
return repository.isEmpty() ? return repository.isEmpty() ?

View File

@@ -51,8 +51,10 @@ class StashModel;
* (in case restore fails due to conflicts) on current and * (in case restore fails due to conflicts) on current and
* delete on selection/all. */ * delete on selection/all. */
class StashDialog : public QDialog { class StashDialog : public QDialog
{
Q_OBJECT Q_OBJECT
public: public:
explicit StashDialog(QWidget *parent = 0); explicit StashDialog(QWidget *parent = 0);
~StashDialog(); ~StashDialog();
@@ -62,9 +64,6 @@ public:
public slots: public slots:
void refresh(const QString &repository, bool force); void refresh(const QString &repository, bool force);
protected:
void changeEvent(QEvent *e);
private slots: private slots:
void deleteAll(); void deleteAll();
void deleteSelection(); void deleteSelection();

View File

@@ -43,18 +43,6 @@ RevertDialog::~RevertDialog()
delete m_ui; 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 QString RevertDialog::revision() const
{ {
return m_ui->revisionLineEdit->text(); return m_ui->revisionLineEdit->text();

View File

@@ -47,9 +47,6 @@ public:
QString revision() const; QString revision() const;
protected:
void changeEvent(QEvent *e);
private: private:
Ui::RevertDialog *m_ui; Ui::RevertDialog *m_ui;
}; };

View File

@@ -59,15 +59,3 @@ QString SrcDestDialog::getRepositoryString() const
return m_ui->localPathChooser->path(); return m_ui->localPathChooser->path();
return m_ui->urlLineEdit->text(); 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;
}
}

View File

@@ -45,12 +45,10 @@ class SrcDestDialog : public QDialog
public: public:
SrcDestDialog(QWidget *parent = 0); SrcDestDialog(QWidget *parent = 0);
~SrcDestDialog(); ~SrcDestDialog();
void setPathChooserKind(Utils::PathChooser::Kind kind); void setPathChooserKind(Utils::PathChooser::Kind kind);
QString getRepositoryString() const; QString getRepositoryString() const;
protected:
void changeEvent(QEvent *e);
private: private:
Ui::SrcDestDialog *m_ui; Ui::SrcDestDialog *m_ui;
}; };

View File

@@ -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) bool DoubleTabWidget::event(QEvent *event)
{ {
if (event->type() == QEvent::ToolTip) { if (event->type() == QEvent::ToolTip) {

View File

@@ -67,7 +67,6 @@ signals:
protected: protected:
void paintEvent(QPaintEvent *event); void paintEvent(QPaintEvent *event);
void mousePressEvent(QMouseEvent *event); void mousePressEvent(QMouseEvent *event);
void changeEvent(QEvent *e);
bool event(QEvent *event); bool event(QEvent *event);
QSize minimumSizeHint() const; QSize minimumSizeHint() const;

View File

@@ -127,18 +127,6 @@ void ProjectWizardPage::setVersionControlIndex(int idx)
m_ui->addToVersionControlComboBox->setCurrentIndex(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 // Alphabetically, and files in sub-directories first
static bool generatedFilePathLessThan(const QString &filePath1, const QString &filePath2) static bool generatedFilePathLessThan(const QString &filePath1, const QString &filePath2)
{ {

View File

@@ -69,15 +69,12 @@ public:
void setProjectComoBoxVisible(bool visible); void setProjectComoBoxVisible(bool visible);
protected:
virtual void changeEvent(QEvent *e);
private slots: private slots:
void slotProjectChanged(int); void slotProjectChanged(int);
void slotManageVcs(); void slotManageVcs();
private: private:
inline void setProjectToolTip(const QString &); void setProjectToolTip(const QString &);
Ui::WizardPage *m_ui; Ui::WizardPage *m_ui;
QStringList m_projectToolTips; QStringList m_projectToolTips;

View File

@@ -147,15 +147,3 @@ int TargetSettingsWidget::currentSubIndex() const
{ {
return m_targetSelector->currentSubIndex(); return m_targetSelector->currentSubIndex();
} }
void TargetSettingsWidget::changeEvent(QEvent *e)
{
QWidget::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
}

View File

@@ -49,6 +49,7 @@ namespace Ui {
class TargetSettingsWidget : public QWidget class TargetSettingsWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit TargetSettingsWidget(QWidget *parent = 0); explicit TargetSettingsWidget(QWidget *parent = 0);
~TargetSettingsWidget(); ~TargetSettingsWidget();
@@ -77,9 +78,6 @@ signals:
void toolTipRequested(const QPoint &globalPosition, int targetIndex); void toolTipRequested(const QPoint &globalPosition, int targetIndex);
void menuShown(int targetIndex); void menuShown(int targetIndex);
protected:
void changeEvent(QEvent *e);
private: private:
Ui::TargetSettingsWidget *ui; Ui::TargetSettingsWidget *ui;

View File

@@ -138,17 +138,5 @@ bool CustomWidgetPluginWizardPage::isComplete() const
return m_complete; 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 Internal
} // namespace Qt4ProjectManager } // namespace Qt4ProjectManager

View File

@@ -45,8 +45,10 @@ namespace Ui {
class CustomWidgetPluginWizardPage; class CustomWidgetPluginWizardPage;
} }
class CustomWidgetPluginWizardPage : public QWizardPage { class CustomWidgetPluginWizardPage : public QWizardPage
{
Q_OBJECT Q_OBJECT
public: public:
explicit CustomWidgetPluginWizardPage(QWidget *parent = 0); explicit CustomWidgetPluginWizardPage(QWidget *parent = 0);
virtual ~CustomWidgetPluginWizardPage(); virtual ~CustomWidgetPluginWizardPage();
@@ -61,9 +63,6 @@ public:
// Fills the plugin fields, excluding widget list. // Fills the plugin fields, excluding widget list.
QSharedPointer<PluginOptions> basicPluginOptions() const; QSharedPointer<PluginOptions> basicPluginOptions() const;
protected:
void changeEvent(QEvent *e);
private slots: private slots:
void on_collectionClassEdit_textChanged(); void on_collectionClassEdit_textChanged();
void on_collectionHeaderEdit_textChanged(); void on_collectionHeaderEdit_textChanged();
@@ -82,4 +81,5 @@ private:
} // namespace Internal } // namespace Internal
} // namespace Qt4ProjectManager } // namespace Qt4ProjectManager
#endif // CUSTOMWIDGETPLUGINWIZARDPAGE_H #endif // CUSTOMWIDGETPLUGINWIZARDPAGE_H

View File

@@ -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 Internal
} // namespace Qt4ProjectManager } // namespace Qt4ProjectManager

View File

@@ -44,8 +44,10 @@ struct TestWizardParameters;
/* TestWizardPage: Let's the user input test class name, slot /* TestWizardPage: Let's the user input test class name, slot
* (for which a CLassNameValidatingLineEdit is abused) and file name. */ * (for which a CLassNameValidatingLineEdit is abused) and file name. */
class TestWizardPage : public QWizardPage { class TestWizardPage : public QWizardPage
{
Q_OBJECT Q_OBJECT
public: public:
explicit TestWizardPage(QWidget *parent = 0); explicit TestWizardPage(QWidget *parent = 0);
~TestWizardPage(); ~TestWizardPage();
@@ -62,18 +64,15 @@ private slots:
void slotFileNameEdited(); void slotFileNameEdited();
void slotUpdateValid(); void slotUpdateValid();
protected:
void changeEvent(QEvent *e);
private: private:
const QString m_sourceSuffix; const QString m_sourceSuffix;
const bool m_lowerCaseFileNames; const bool m_lowerCaseFileNames;
Ui::TestWizardPage *ui; Ui::TestWizardPage *ui;
bool m_fileNameEdited; bool m_fileNameEdited;
bool m_valid; bool m_valid;
}; };
} // namespace Internal } // namespace Internal
} // namespace Qt4ProjectManager } // namespace Qt4ProjectManager
#endif // TESTWIZARDPAGE_H #endif // TESTWIZARDPAGE_H

View File

@@ -136,15 +136,3 @@ void ManageDefinitionsDialog::invertSelection()
ui.definitionsTable->selectionModel()->select(itemSelection, QItemSelectionModel::Toggle); ui.definitionsTable->selectionModel()->select(itemSelection, QItemSelectionModel::Toggle);
ui.definitionsTable->setFocus(); ui.definitionsTable->setFocus();
} }
void ManageDefinitionsDialog::changeEvent(QEvent *e)
{
QDialog::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui.retranslateUi(this);
break;
default:
break;
}
}

View File

@@ -41,14 +41,12 @@ namespace Internal {
class ManageDefinitionsDialog : public QDialog class ManageDefinitionsDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit ManageDefinitionsDialog(const QList<HighlightDefinitionMetaData> &metaDataList, explicit ManageDefinitionsDialog(const QList<HighlightDefinitionMetaData> &metaDataList,
const QString &path, const QString &path,
QWidget *parent = 0); QWidget *parent = 0);
protected:
void changeEvent(QEvent *e);
private slots: private slots:
void downloadDefinitions(); void downloadDefinitions();
void selectAll(); void selectAll();

View File

@@ -121,16 +121,4 @@ void TabSettingsWidget::setCodingStyleWarningVisible(bool visible)
ui->codingStyleWarning->setVisible(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 } // namespace TextEditor

View File

@@ -66,9 +66,6 @@ signals:
void settingsChanged(const TextEditor::TabSettings &); void settingsChanged(const TextEditor::TabSettings &);
void codingStyleLinkClicked(TextEditor::TabSettingsWidget::CodingStyleLink link); void codingStyleLinkClicked(TextEditor::TabSettingsWidget::CodingStyleLink link);
protected:
void changeEvent(QEvent *e);
private slots: private slots:
void slotSettingsChanged(); void slotSettingsChanged();
void codingStyleLinkActivated(const QString &linkString); void codingStyleLinkActivated(const QString &linkString);

View File

@@ -230,18 +230,6 @@ void BaseCheckoutWizardPage::slotDirectoryEdited()
slotChanged(); 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 bool BaseCheckoutWizardPage::isComplete() const
{ {
return d->m_valid; return d->m_valid;

View File

@@ -75,8 +75,6 @@ public:
bool isBranchSelectorVisible() const; bool isBranchSelectorVisible() const;
protected: protected:
void changeEvent(QEvent *e);
void setRepositoryLabel(const QString &l); void setRepositoryLabel(const QString &l);
void setDirectoryVisible(bool v); void setDirectoryVisible(bool v);
void setBranchSelectorVisible(bool v); void setBranchSelectorVisible(bool v);

View File

@@ -124,17 +124,5 @@ bool CheckoutProgressWizardPage::isComplete() const
return m_state == Succeeded; 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 Internal
} // namespace VcsBase } // namespace VcsBase

View File

@@ -64,9 +64,6 @@ private slots:
void slotFailed(const QString &); void slotFailed(const QString &);
void slotSucceeded(); void slotSucceeded();
protected:
void changeEvent(QEvent *e);
private: private:
Ui::CheckoutProgressWizardPage *ui; Ui::CheckoutProgressWizardPage *ui;
QSharedPointer<AbstractCheckoutJob> m_job; QSharedPointer<AbstractCheckoutJob> m_job;

View File

@@ -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 } // namespace VcsBase
#include "cleandialog.moc" #include "cleandialog.moc"

View File

@@ -55,9 +55,6 @@ public:
public slots: public slots:
void accept(); void accept();
protected:
void changeEvent(QEvent *e);
private slots: private slots:
void slotDoubleClicked(const QModelIndex &); void slotDoubleClicked(const QModelIndex &);
void selectAllItems(bool checked); void selectAllItems(bool checked);

View File

@@ -517,18 +517,6 @@ QString SubmitEditorWidget::cleanupDescription(const QString &input) const
return input; 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) void SubmitEditorWidget::insertTopWidget(QWidget *w)
{ {
d->m_ui.vboxLayout->insertWidget(0, w); d->m_ui.vboxLayout->insertWidget(0, w);

View File

@@ -119,7 +119,6 @@ private slots:
protected: protected:
virtual QString cleanupDescription(const QString &) const; virtual QString cleanupDescription(const QString &) const;
virtual void changeEvent(QEvent *e);
virtual QString commitName() const; virtual QString commitName() const;
void insertTopWidget(QWidget *w); void insertTopWidget(QWidget *w);
void hideDescription(); void hideDescription();