Commit 6ae56210 authored by Laurent Montel's avatar Laurent Montel 😁

Fix signal

parent ee6580d5
......@@ -63,7 +63,7 @@ void IncidencesForWidgetTest::shouldEmitSignalWhenIndexChanged()
MailCommon::IncidencesForWidget contentType;
contentType.show();
QTest::qWaitForWindowShown(&contentType);
QSignalSpy spy(&contentType, SIGNAL(indexChanged(int)));
QSignalSpy spy(&contentType, SIGNAL(currentIndexChanged(int)));
contentType.setCurrentIndex(1);
QCOMPARE(spy.at(0).count(), 1);
}
......
......@@ -30,10 +30,12 @@ IncidencesForWidget::IncidencesForWidget(QWidget *parent)
: QWidget(parent)
{
QHBoxLayout *hbox = new QHBoxLayout(this);
hbox->setMargin(0);
QLabel *label = new QLabel( i18n( "Generate free/&busy and activate alarms for:" ), this );
label->setObjectName(QLatin1String("contentstypelabel"));
hbox->addWidget(label);
mIncidencesForComboBox = new KComboBox( this );
label->setBuddy( mIncidencesForComboBox );
hbox->addWidget(mIncidencesForComboBox);
......@@ -58,7 +60,7 @@ IncidencesForWidget::IncidencesForWidget(QWidget *parent)
mIncidencesForComboBox->setObjectName(QLatin1String("contentstypecombobox"));
mIncidencesForComboBox->setWhatsThis( whatsThisForMyOwnFolders );
connect(mIncidencesForComboBox, SIGNAL(currentIndexChanged(int)), SIGNAL(indexChanged(int)));
connect(mIncidencesForComboBox, SIGNAL(currentIndexChanged(int)), SIGNAL(currentIndexChanged(int)));
}
IncidencesForWidget::~IncidencesForWidget()
......
......@@ -37,7 +37,7 @@ public:
void setCurrentIndex(int index);
Q_SIGNALS:
void indexChanged(int value);
void currentIndexChanged(int value);
private:
KComboBox *mIncidencesForComboBox;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment