forked from qt-creator/qt-creator
Aggregation: Use Qt5-style connects
Change-Id: Ifee501f2da7d2834f6ce8a63f85e9fab9c683b5d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
9370e863f8
commit
4ed9b68fbf
@@ -31,7 +31,8 @@ MyMain::MyMain(QWidget *parent, Qt::WFlags flags)
|
||||
: QWidget(parent, flags)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
connect(ui.comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(select(int)));
|
||||
connect(ui.comboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
this, &MyMain::select);
|
||||
}
|
||||
|
||||
void MyMain::add(IComboEntry *obj)
|
||||
|
||||
@@ -42,10 +42,9 @@ public:
|
||||
|
||||
void add(IComboEntry *obj);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void select(int index);
|
||||
|
||||
private:
|
||||
Ui::mainClass ui;
|
||||
|
||||
QList<IComboEntry *> m_entries;
|
||||
|
||||
Reference in New Issue
Block a user