Commit b76e82ee authored by JanKusanagi's avatar JanKusanagi

More minor optimizations

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