Commit ead41b0d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

USe alternatingRowColors + improve autotest

parent 19461d5b
Pipeline #143761 failed with stage
in 1 minute and 51 seconds
......@@ -25,4 +25,8 @@ void OpenUrlWithConfigureWidgetTest::shouldHaveDefaultValues()
auto mListWidget = w.findChild<QListWidget *>(QStringLiteral("mListWidget"));
QVERIFY(mListWidget);
QVERIFY(mListWidget->alternatingRowColors());
QVERIFY(mListWidget->isSortingEnabled());
QCOMPARE(mListWidget->contextMenuPolicy(), Qt::CustomContextMenu);
QCOMPARE(mListWidget->selectionMode(), QAbstractItemView::ExtendedSelection);
}
......@@ -62,6 +62,7 @@ OpenUrlWithConfigureWidget::OpenUrlWithConfigureWidget(QWidget *parent)
mainLayout->addWidget(mListWidget);
mListWidget->setContextMenuPolicy(Qt::CustomContextMenu);
mListWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
mListWidget->setAlternatingRowColors(true);
mListWidget->setSortingEnabled(true);
connect(mListWidget, &QListWidget::customContextMenuRequested, this, &OpenUrlWithConfigureWidget::slotCustomContextMenuRequested);
connect(mListWidget, &QListWidget::itemDoubleClicked, this, &OpenUrlWithConfigureWidget::slotEditRule);
......
......@@ -31,6 +31,7 @@ void ViewerPluginExternalConfigureWidgetTest::shouldHaveDefaultValue()
auto mListExternal = w.findChild<QListWidget *>(QStringLiteral("listexternal"));
QVERIFY(mListExternal);
QCOMPARE(mListExternal->selectionMode(), QAbstractItemView::SingleSelection);
QVERIFY(mListExternal->alternatingRowColors());
auto mAddScript = w.findChild<QPushButton *>(QStringLiteral("addscript"));
QVERIFY(mAddScript);
......
......@@ -73,6 +73,7 @@ ViewerPluginExternalConfigureWidget::ViewerPluginExternalConfigureWidget(QWidget
mListExternal->setObjectName(QStringLiteral("listexternal"));
mListExternal->setSelectionMode(QAbstractItemView::SingleSelection);
mListExternal->setAlternatingRowColors(true);
listLayout->addWidget(mListExternal);
connect(mListExternal, &QListWidget::itemSelectionChanged, this, &ViewerPluginExternalConfigureWidget::updateButtons);
connect(mListExternal, &QListWidget::itemDoubleClicked, this, &ViewerPluginExternalConfigureWidget::slotDoubleClicked);
......
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