Commit b76e82ee authored by JanKusanagi's avatar JanKusanagi

More minor optimizations

parent 59cf9b0f
...@@ -35,8 +35,8 @@ ListsManager::ListsManager(PumpController *pumpController, ...@@ -35,8 +35,8 @@ ListsManager::ListsManager(PumpController *pumpController,
// To show the current lists // To show the current lists
m_listsTreeWidget = new QTreeWidget(this); m_listsTreeWidget = new QTreeWidget(this);
m_listsTreeWidget->setColumnCount(2); m_listsTreeWidget->setColumnCount(2);
m_listsTreeWidget->setHeaderLabels(QStringList() << tr("Name") m_listsTreeWidget->setHeaderLabels(QStringList{ tr("Name"),
<< tr("Members")); tr("Members") });
m_listsTreeWidget->setSortingEnabled(true); m_listsTreeWidget->setSortingEnabled(true);
m_listsTreeWidget->sortByColumn(0, Qt::AscendingOrder); m_listsTreeWidget->sortByColumn(0, Qt::AscendingOrder);
m_listsTreeWidget->setAlternatingRowColors(true); m_listsTreeWidget->setAlternatingRowColors(true);
......
...@@ -203,9 +203,10 @@ void FDNotifications::showMessage(QString message) ...@@ -203,9 +203,10 @@ void FDNotifications::showMessage(QString message)
arguments << QStringLiteral("dialog-information"); arguments << QStringLiteral("dialog-information");
} }
QStringList actions; // Handled on MainWindow::onNotificationAction() // Notification button handled on MainWindow::onNotificationAction()
actions << QString("dianara_%1_show").arg(qApp->applicationPid()) const QStringList actions = QStringList{
<< tr("Show"); // Could use "default" as ID, and no visible name QString("dianara_%1_show").arg(qApp->applicationPid()),
tr("Show") }; // Could use "default" as ID, and no visible name
arguments << notificationTitle; arguments << notificationTitle;
arguments << message; arguments << message;
arguments << actions; arguments << actions;
......
...@@ -1042,34 +1042,41 @@ QStringList PumpController::getFeedNameAndPath(int feedType) ...@@ -1042,34 +1042,41 @@ QStringList PumpController::getFeedNameAndPath(int feedType)
switch (feedType) switch (feedType)
{ {
case MainTimelineRequest: case MainTimelineRequest:
nameAndPath << tr("Timeline") << QStringLiteral("/inbox/major"); nameAndPath = QStringList{ tr("Timeline"),
QStringLiteral("/inbox/major") };
break; break;
case DirectTimelineRequest: case DirectTimelineRequest:
nameAndPath << tr("Messages") << QStringLiteral("/inbox/direct/major"); nameAndPath = QStringList{ tr("Messages"),
QStringLiteral("/inbox/direct/major") };
break; break;
case ActivityTimelineRequest: case ActivityTimelineRequest:
nameAndPath << tr("Activity") << QStringLiteral("/feed/major"); nameAndPath = QStringList{ tr("Activity"),
QStringLiteral("/feed/major") };
break; break;
case FavoritesTimelineRequest: case FavoritesTimelineRequest:
nameAndPath << tr("Favorites") << QStringLiteral("/favorites"); nameAndPath = QStringList{ tr("Favorites"),
QStringLiteral("/favorites") };
break; break;
case MinorFeedMainRequest: case MinorFeedMainRequest:
nameAndPath << tr("Meanwhile") << QStringLiteral("/inbox/minor"); nameAndPath = QStringList{ tr("Meanwhile"),
QStringLiteral("/inbox/minor") };
break; break;
case MinorFeedDirectRequest: case MinorFeedDirectRequest:
nameAndPath << tr("Mentions") << QStringLiteral("/inbox/direct/minor"); nameAndPath = QStringList{ tr("Mentions"),
QStringLiteral("/inbox/direct/minor") };
break; break;
case MinorFeedActivityRequest: case MinorFeedActivityRequest:
nameAndPath << tr("Actions") << QStringLiteral("/feed/minor"); nameAndPath = QStringList{ tr("Actions"),
QStringLiteral("/feed/minor") };
break; break;
case UserTimelineRequest: case UserTimelineRequest:
nameAndPath << tr("User timeline") << QString(); //// FIXME? nameAndPath = QStringList{ tr("User timeline"), QString() }; //// FIXME?
break; break;
default: default:
nameAndPath << QString() << QString(); nameAndPath = QStringList{ QString(), QString() };
qDebug() << "PumpController::getFeedNameAndPath() wrong feed type!"; qDebug() << "PumpController::getFeedNameAndPath() wrong feed type!";
} }
......
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