Some clazy fixes.
This commit is contained in:
parent
739ddbd10f
commit
ec886d15ee
@ -65,7 +65,7 @@ QString Enclosures::encodeEnclosuresToString(const QList<Enclosure> &enclosures)
|
||||
}
|
||||
|
||||
Message::Message() {
|
||||
m_title = m_url = m_author = m_contents = m_feedId = m_customId = m_customHash = "";
|
||||
m_title = m_url = m_author = m_contents = m_feedId = m_customId = m_customHash = QSL("");
|
||||
m_enclosures = QList<Enclosure>();
|
||||
m_accountId = m_id = 0;
|
||||
m_isRead = m_isImportant = false;
|
||||
|
@ -74,7 +74,7 @@ void MessagesModel::loadMessages(RootItem *item) {
|
||||
}
|
||||
else {
|
||||
if (!item->getParentServiceRoot()->loadMessagesForItem(item, this)) {
|
||||
setFilter("true != true");
|
||||
setFilter(QSL("true != true"));
|
||||
qWarning("Loading of messages from item '%s' failed.", qPrintable(item->title()));
|
||||
qApp->showGuiMessage(tr("Loading of messages from item '%1' failed.").arg(item->title()),
|
||||
tr("Loading of messages failed, maybe messages could not be downloaded."),
|
||||
@ -201,7 +201,7 @@ QVariant MessagesModel::data(const QModelIndex &idx, int role) const {
|
||||
else if (index_column == MSG_DB_AUTHOR_INDEX) {
|
||||
const QString author_name = QSqlTableModel::data(idx, role).toString();
|
||||
|
||||
return author_name.isEmpty() ? "-" : author_name;
|
||||
return author_name.isEmpty() ? QSL("-") : author_name;
|
||||
}
|
||||
else if (index_column != MSG_DB_IMPORTANT_INDEX && index_column != MSG_DB_READ_INDEX) {
|
||||
return QSqlTableModel::data(idx, role);
|
||||
|
@ -72,7 +72,8 @@ void ShortcutButton::keyPressEvent(QKeyEvent *event) {
|
||||
}
|
||||
|
||||
if (!m_catcher->m_isRecording) {
|
||||
return QPushButton::keyPressEvent(event);
|
||||
QPushButton::keyPressEvent(event);
|
||||
return;
|
||||
}
|
||||
|
||||
event->accept();
|
||||
@ -124,7 +125,8 @@ void ShortcutButton::keyReleaseEvent(QKeyEvent *event) {
|
||||
}
|
||||
|
||||
if (!m_catcher->m_isRecording) {
|
||||
return QPushButton::keyReleaseEvent(event);
|
||||
QPushButton::keyReleaseEvent(event);
|
||||
return;
|
||||
}
|
||||
|
||||
event->accept();
|
||||
|
@ -35,7 +35,7 @@ BaseToolBar::~BaseToolBar() {
|
||||
qDebug("Destroying BaseToolBar instance.");
|
||||
}
|
||||
|
||||
QAction *BaseBar::findMatchingAction(const QString &action, const QList<QAction*> actions) const {
|
||||
QAction *BaseBar::findMatchingAction(const QString &action, const QList<QAction*> &actions) const {
|
||||
foreach (QAction *act, actions) {
|
||||
if (act->objectName() == action) {
|
||||
return act;
|
||||
|
@ -38,7 +38,7 @@ class BaseBar {
|
||||
virtual void loadChangeableActions() = 0;
|
||||
|
||||
protected:
|
||||
QAction *findMatchingAction(const QString &action, const QList<QAction*> actions) const;
|
||||
QAction *findMatchingAction(const QString &action, const QList<QAction *> &actions) const;
|
||||
};
|
||||
|
||||
class BaseToolBar : public QToolBar, public BaseBar {
|
||||
|
@ -191,7 +191,7 @@ void FormMain::prepareMenus() {
|
||||
#if defined(Q_OS_WIN)
|
||||
m_trayMenu = new TrayIconMenu(APP_NAME, this);
|
||||
#else
|
||||
m_trayMenu = new QMenu(APP_NAME, this);
|
||||
m_trayMenu = new QMenu(QSL(APP_NAME), this);
|
||||
#endif
|
||||
|
||||
// Add needed items to the menu.
|
||||
@ -252,7 +252,7 @@ void FormMain::updateAddItemMenu() {
|
||||
m_ui->m_menuAddItem);
|
||||
root_menu->addAction(action_new_feed);
|
||||
// NOTE: Because of default arguments.
|
||||
connect(action_new_feed, SIGNAL(triggered()), activated_root, SLOT(addNewFeed()));
|
||||
connect(action_new_feed, SIGNAL(triggered(bool)), activated_root, SLOT(addNewFeed()));
|
||||
}
|
||||
|
||||
if (!specific_root_actions.isEmpty()) {
|
||||
@ -349,7 +349,7 @@ void FormMain::updateAccountsMenu() {
|
||||
m_ui->m_menuAccounts->addAction(m_ui->m_actionServiceDelete);
|
||||
}
|
||||
|
||||
void FormMain::onFeedUpdatesFinished(FeedDownloadResults results) {
|
||||
void FormMain::onFeedUpdatesFinished(const FeedDownloadResults &results) {
|
||||
Q_UNUSED(results)
|
||||
|
||||
statusBar()->clearProgressFeeds();
|
||||
|
@ -75,7 +75,7 @@ class FormMain : public QMainWindow {
|
||||
|
||||
void onFeedUpdatesStarted();
|
||||
void onFeedUpdatesProgress(const Feed *feed, int current, int total);
|
||||
void onFeedUpdatesFinished(FeedDownloadResults results);
|
||||
void onFeedUpdatesFinished(const FeedDownloadResults &results);
|
||||
|
||||
// Displays various dialogs.
|
||||
void backupDatabaseSettings();
|
||||
|
@ -87,7 +87,7 @@ class StandardFeed : public Feed {
|
||||
return m_type;
|
||||
}
|
||||
|
||||
inline void setType(const Type &type) {
|
||||
inline void setType(Type type) {
|
||||
m_type = type;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user