Some clazy fixes.
This commit is contained in:
parent
338f03228d
commit
c715aa180a
@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
|
|
||||||
class StyledItemDelegateWithoutFocus : public QStyledItemDelegate {
|
class StyledItemDelegateWithoutFocus : public QStyledItemDelegate {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Constructors.
|
// Constructors.
|
||||||
explicit StyledItemDelegateWithoutFocus(QObject *parent = 0);
|
explicit StyledItemDelegateWithoutFocus(QObject *parent = 0);
|
||||||
|
@ -98,7 +98,6 @@ class WebBrowser;
|
|||||||
class DownloadManager : public TabContent {
|
class DownloadManager : public TabContent {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(RemovePolicy removePolicy READ removePolicy WRITE setRemovePolicy)
|
Q_PROPERTY(RemovePolicy removePolicy READ removePolicy WRITE setRemovePolicy)
|
||||||
Q_ENUMS(RemovePolicy)
|
|
||||||
|
|
||||||
friend class DownloadModel;
|
friend class DownloadModel;
|
||||||
|
|
||||||
@ -109,6 +108,8 @@ class DownloadManager : public TabContent {
|
|||||||
OnSuccessfullDownload
|
OnSuccessfullDownload
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_ENUM(RemovePolicy)
|
||||||
|
|
||||||
explicit DownloadManager(QWidget *parent = 0);
|
explicit DownloadManager(QWidget *parent = 0);
|
||||||
virtual ~DownloadManager();
|
virtual ~DownloadManager();
|
||||||
|
|
||||||
|
@ -91,9 +91,11 @@ QString WebFactory::escapeHtml(const QString &html) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString output = html;
|
QString output = html;
|
||||||
|
QMapIterator<QString, QString> i(m_escapes);
|
||||||
|
|
||||||
foreach (const QString &key, m_escapes.keys()) {
|
while (i.hasNext()) {
|
||||||
output = output.replace(key, m_escapes.value(key));
|
i.next();
|
||||||
|
output = output.replace(i.key(), i.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
@ -105,9 +107,11 @@ QString WebFactory::deEscapeHtml(const QString &text) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString output = text;
|
QString output = text;
|
||||||
|
QMapIterator<QString, QString> i(m_deEscapes);
|
||||||
|
|
||||||
foreach (const QString &key, m_deEscapes.keys()) {
|
while (i.hasNext()) {
|
||||||
output = output.replace(key, m_deEscapes.value(key));
|
i.next();
|
||||||
|
output = output.replace(i.key(), i.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
|
@ -66,6 +66,8 @@ namespace QtLP_Private {
|
|||||||
|
|
||||||
class QT_QTLOCKEDFILE_EXPORT QtLockedFile : public QFile
|
class QT_QTLOCKEDFILE_EXPORT QtLockedFile : public QFile
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum LockMode { NoLock = 0, ReadLock, WriteLock };
|
enum LockMode { NoLock = 0, ReadLock, WriteLock };
|
||||||
|
|
||||||
|
@ -502,7 +502,7 @@ RootItem *OwnCloudGetFeedsCategoriesResponse::feedsCategories(bool obtain_icons)
|
|||||||
cats.insert(0, parent);
|
cats.insert(0, parent);
|
||||||
|
|
||||||
// Process categories first, then process feeds.
|
// Process categories first, then process feeds.
|
||||||
foreach (QJsonValue cat, QJsonDocument::fromJson(m_contentCategories.toUtf8()).object()["folders"].toArray()) {
|
foreach (const QJsonValue &cat, QJsonDocument::fromJson(m_contentCategories.toUtf8()).object()["folders"].toArray()) {
|
||||||
QJsonObject item = cat.toObject();
|
QJsonObject item = cat.toObject();
|
||||||
OwnCloudCategory *category = new OwnCloudCategory();
|
OwnCloudCategory *category = new OwnCloudCategory();
|
||||||
|
|
||||||
@ -516,7 +516,7 @@ RootItem *OwnCloudGetFeedsCategoriesResponse::feedsCategories(bool obtain_icons)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We have categories added, now add all feeds.
|
// We have categories added, now add all feeds.
|
||||||
foreach (QJsonValue fed, QJsonDocument::fromJson(m_contentFeeds.toUtf8()).object()["feeds"].toArray()) {
|
foreach (const QJsonValue &fed, QJsonDocument::fromJson(m_contentFeeds.toUtf8()).object()["feeds"].toArray()) {
|
||||||
QJsonObject item = fed.toObject();
|
QJsonObject item = fed.toObject();
|
||||||
OwnCloudFeed *feed = new OwnCloudFeed();
|
OwnCloudFeed *feed = new OwnCloudFeed();
|
||||||
|
|
||||||
@ -557,7 +557,7 @@ OwnCloudGetMessagesResponse::~OwnCloudGetMessagesResponse() {
|
|||||||
QList<Message> OwnCloudGetMessagesResponse::messages() const {
|
QList<Message> OwnCloudGetMessagesResponse::messages() const {
|
||||||
QList<Message> msgs;
|
QList<Message> msgs;
|
||||||
|
|
||||||
foreach (QJsonValue message, m_rawContent["items"].toArray()) {
|
foreach (const QJsonValue &message, m_rawContent["items"].toArray()) {
|
||||||
QJsonObject message_map = message.toObject();
|
QJsonObject message_map = message.toObject();
|
||||||
Message msg;
|
Message msg;
|
||||||
|
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
|
|
||||||
class OwnCloudCategory : public Category {
|
class OwnCloudCategory : public Category {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit OwnCloudCategory(RootItem *parent = NULL);
|
explicit OwnCloudCategory(RootItem *parent = NULL);
|
||||||
explicit OwnCloudCategory(const QSqlRecord &record);
|
explicit OwnCloudCategory(const QSqlRecord &record);
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
class OwnCloudServiceRoot;
|
class OwnCloudServiceRoot;
|
||||||
|
|
||||||
class OwnCloudRecycleBin : public RecycleBin {
|
class OwnCloudRecycleBin : public RecycleBin {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit OwnCloudRecycleBin(RootItem *parent = NULL);
|
explicit OwnCloudRecycleBin(RootItem *parent = NULL);
|
||||||
virtual ~OwnCloudRecycleBin();
|
virtual ~OwnCloudRecycleBin();
|
||||||
|
@ -154,10 +154,13 @@ void OwnCloudServiceRoot::saveAllCachedData() {
|
|||||||
|
|
||||||
m_cacheSaveMutex->unlock();
|
m_cacheSaveMutex->unlock();
|
||||||
|
|
||||||
|
QMapIterator<RootItem::ReadStatus, QStringList> i(cached_data_read);
|
||||||
|
|
||||||
// Save the actual data.
|
// Save the actual data.
|
||||||
for (int i = 0; i < cached_data_read.size(); i++) {
|
while (i.hasNext()) {
|
||||||
auto key = cached_data_read.keys().at(i);
|
i.next();
|
||||||
QStringList ids = cached_data_read[key];
|
auto key = i.key();
|
||||||
|
QStringList ids = i.value();
|
||||||
|
|
||||||
if (!ids.isEmpty()) {
|
if (!ids.isEmpty()) {
|
||||||
network()->markMessagesRead(key, ids);
|
network()->markMessagesRead(key, ids);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user