Commit 0fc6a717 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Prefer using ExtendedSelection mode

parent 57cc30ae
Pipeline #51309 failed with stage
in 8 minutes and 8 seconds
...@@ -31,7 +31,7 @@ void CustomDebugSettingsPageTest::shouldHaveDefaultValue() ...@@ -31,7 +31,7 @@ void CustomDebugSettingsPageTest::shouldHaveDefaultValue()
auto listWidget = page.findChild<QListWidget *>(QStringLiteral("custom_listwidget")); auto listWidget = page.findChild<QListWidget *>(QStringLiteral("custom_listwidget"));
QVERIFY(listWidget); QVERIFY(listWidget);
QCOMPARE(listWidget->selectionMode(), QAbstractItemView::MultiSelection); QCOMPARE(listWidget->selectionMode(), QAbstractItemView::ExtendedSelection);
QCOMPARE(listWidget->count(), 0); QCOMPARE(listWidget->count(), 0);
QCOMPARE(listWidget->contextMenuPolicy(), Qt::CustomContextMenu); QCOMPARE(listWidget->contextMenuPolicy(), Qt::CustomContextMenu);
......
...@@ -40,7 +40,7 @@ CustomDebugSettingsPage::CustomDebugSettingsPage(QWidget *parent) ...@@ -40,7 +40,7 @@ CustomDebugSettingsPage::CustomDebugSettingsPage(QWidget *parent)
horizontalLayout->addLayout(vbox); horizontalLayout->addLayout(vbox);
mListWidget->setObjectName(QStringLiteral("custom_listwidget")); mListWidget->setObjectName(QStringLiteral("custom_listwidget"));
mListWidget->setSelectionMode(QAbstractItemView::MultiSelection); mListWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
mListWidget->setContextMenuPolicy(Qt::CustomContextMenu); mListWidget->setContextMenuPolicy(Qt::CustomContextMenu);
connect(mListWidget, &QListWidget::itemSelectionChanged, this, &CustomDebugSettingsPage::updateButtons); connect(mListWidget, &QListWidget::itemSelectionChanged, this, &CustomDebugSettingsPage::updateButtons);
connect(mListWidget, &QListWidget::itemDoubleClicked, this, &CustomDebugSettingsPage::slotEditRule); connect(mListWidget, &QListWidget::itemDoubleClicked, this, &CustomDebugSettingsPage::slotEditRule);
......
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