Some clazy fixes.
This commit is contained in:
parent
49b23532ef
commit
739ddbd10f
5 changed files with 10 additions and 10 deletions
|
@ -86,12 +86,12 @@ QMimeData *FeedsModel::mimeData(const QModelIndexList &indexes) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mime_data->setData(MIME_TYPE_ITEM_POINTER, encoded_data);
|
mime_data->setData(QSL(MIME_TYPE_ITEM_POINTER), encoded_data);
|
||||||
return mime_data;
|
return mime_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList FeedsModel::mimeTypes() const {
|
QStringList FeedsModel::mimeTypes() const {
|
||||||
return QStringList() << MIME_TYPE_ITEM_POINTER;
|
return QStringList() << QSL(MIME_TYPE_ITEM_POINTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FeedsModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) {
|
bool FeedsModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) {
|
||||||
|
@ -105,7 +105,7 @@ bool FeedsModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray dragged_items_data = data->data(MIME_TYPE_ITEM_POINTER);
|
QByteArray dragged_items_data = data->data(QSL(MIME_TYPE_ITEM_POINTER));
|
||||||
|
|
||||||
if (dragged_items_data.isEmpty()) {
|
if (dragged_items_data.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -241,7 +241,7 @@ void FeedsProxyModel::invalidateReadFeedsFilter(bool set_new_value, bool show_un
|
||||||
setShowUnreadOnly(show_unread_only);
|
setShowUnreadOnly(show_unread_only);
|
||||||
}
|
}
|
||||||
|
|
||||||
QTimer::singleShot(0, this, SLOT(invalidateFilter()));
|
QTimer::singleShot(0, this, &FeedsProxyModel::invalidateFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FeedsProxyModel::setShowUnreadOnly(bool show_unread_only) {
|
void FeedsProxyModel::setShowUnreadOnly(bool show_unread_only) {
|
||||||
|
|
|
@ -48,7 +48,7 @@ class IOFactory {
|
||||||
// Throws exception when no such file exists.
|
// Throws exception when no such file exists.
|
||||||
static QByteArray readTextFile(const QString &file_path);
|
static QByteArray readTextFile(const QString &file_path);
|
||||||
|
|
||||||
static void writeTextFile(const QString &file_path, const QByteArray &data, const QString &encoding = "UTF-8");
|
static void writeTextFile(const QString &file_path, const QByteArray &data, const QString &encoding = QSL("UTF-8"));
|
||||||
|
|
||||||
// Copies file, overwrites destination.
|
// Copies file, overwrites destination.
|
||||||
static bool copyFile(const QString &source, const QString &destination);
|
static bool copyFile(const QString &source, const QString &destination);
|
||||||
|
|
|
@ -317,11 +317,11 @@ class Settings : public QSettings {
|
||||||
|
|
||||||
// Getters/setters for settings values.
|
// Getters/setters for settings values.
|
||||||
inline QVariant value(const QString §ion, const QString &key, const QVariant &default_value = QVariant()) const {
|
inline QVariant value(const QString §ion, const QString &key, const QVariant &default_value = QVariant()) const {
|
||||||
return QSettings::value(QString("%1/%2").arg(section, key), default_value);
|
return QSettings::value(QString(QSL("%1/%2")).arg(section, key), default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void setValue(const QString §ion, const QString &key, const QVariant &value) {
|
inline void setValue(const QString §ion, const QString &key, const QVariant &value) {
|
||||||
QSettings::setValue(QString("%1/%2").arg(section, key), value);
|
QSettings::setValue(QString(QSL("%1/%2")).arg(section, key), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void setValue(const QString &key, const QVariant &value) {
|
inline void setValue(const QString &key, const QVariant &value) {
|
||||||
|
@ -329,11 +329,11 @@ class Settings : public QSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool contains(const QString §ion, const QString &key) const {
|
inline bool contains(const QString §ion, const QString &key) const {
|
||||||
return QSettings::contains(QString("%1/%2").arg(section, key));
|
return QSettings::contains(QString(QSL("%1/%2")).arg(section, key));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void remove(const QString §ion, const QString &key) {
|
inline void remove(const QString §ion, const QString &key) {
|
||||||
QSettings::remove(QString("%1/%2").arg(section, key));
|
QSettings::remove(QString(QSL("%1/%2")).arg(section, key));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the path which contains the settings.
|
// Returns the path which contains the settings.
|
||||||
|
|
|
@ -152,7 +152,7 @@ class RootItem : public QObject {
|
||||||
m_childItems.clear();
|
m_childItems.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void setChildItems(QList<RootItem*> child_items) {
|
inline void setChildItems(const QList<RootItem*> &child_items) {
|
||||||
m_childItems = child_items;
|
m_childItems = child_items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue