Commit 4ea8c2c6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Modernize code (using auto)

parent 6689bf5a
Pipeline #39389 passed with stage
in 8 minutes and 15 seconds
......@@ -71,14 +71,14 @@ void GrantleeThemeManagerTest::destructionOrderTest()
QCOMPARE(manager->themes().count(), 2);
QVERIFY(!manager->actionForTheme()); // Bug? No "default" theme.
QActionGroup *actionGroup = new QActionGroup(this);
auto *actionGroup = new QActionGroup(this);
manager->setActionGroup(actionGroup);
KActionMenu *menu = new KActionMenu(this);
auto *menu = new KActionMenu(this);
manager->setThemeMenu(menu);
QCOMPARE(menu->menu()->actions().count(), 4); // 2 themes + separator + download
KActionMenu *menu2 = new KActionMenu(this);
auto *menu2 = new KActionMenu(this);
manager->setThemeMenu(menu2);
QCOMPARE(menu2->menu()->actions().count(), 4);
......
......@@ -222,7 +222,7 @@ public:
void slotThemeSelected()
{
if (q->sender()) {
KToggleAction *act = qobject_cast<KToggleAction *>(q->sender());
auto *act = qobject_cast<KToggleAction *>(q->sender());
selectTheme(act);
Q_EMIT q->grantleeThemeSelected();
}
......
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