forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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() ?
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user