-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed compilation errors/warnings. Qt req is raised to 5.10
- Loading branch information
Showing
34 changed files
with
93 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
plugins/baseintegration/3rdparty/qxt/.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ E-Mail: [email protected] XMPP: [email protected] | |
#include <QApplication> | ||
#include <QDesktopWidget> | ||
#include <QHBoxLayout> | ||
#include <QRandomGenerator> | ||
#include <QSettings> | ||
|
||
#include "note.h" | ||
|
@@ -55,8 +56,8 @@ NoteDialog::NoteDialog(NoteWidget *noteWidget) : QDialog(0), m_ui(new Ui::NoteDi | |
} | ||
if (rect.isEmpty()) { | ||
QSize avail = QApplication::desktop()->size() - sizeHint(); | ||
int x = avail.width() / 4 + (qrand() / (float)RAND_MAX) * avail.width() / 2; | ||
int y = avail.height() / 4 + (qrand() / (float)RAND_MAX) * avail.height() / 2; | ||
int x = avail.width() / 4 + (QRandomGenerator::global()->generate() / (float)RAND_MAX) * avail.width() / 2; | ||
int y = avail.height() / 4 + (QRandomGenerator::global()->generate() / (float)RAND_MAX) * avail.height() / 2; | ||
move(x, y); | ||
} else { | ||
setGeometry(rect); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,12 +19,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |
E-Mail: [email protected] XMPP: [email protected] | ||
*/ | ||
|
||
#include "notemanager.h" | ||
|
||
#include <QApplication> | ||
#include <QLinkedList> | ||
#include <QSettings> | ||
#include <QStringList> | ||
|
||
#include "notemanager.h" | ||
#include <list> | ||
|
||
namespace QtNote { | ||
|
||
|
@@ -123,7 +124,7 @@ QList<NoteListItem> NoteManager::noteList(int count) const | |
foreach (NoteStorage::Ptr storage, prioritizedStorages()) { | ||
ret += storage->noteList(count); | ||
} | ||
qSort(ret.begin(), ret.end(), noteListItemModifyComparer); | ||
std::sort(ret.begin(), ret.end(), noteListItemModifyComparer); | ||
return ret.mid(0, count); | ||
} | ||
|
||
|
@@ -152,7 +153,7 @@ const QMap<QString, NoteStorage::Ptr> NoteManager::storages(bool withInvalid) co | |
return ret; | ||
} | ||
|
||
const QLinkedList<NoteStorage::Ptr> NoteManager::prioritizedStorages(bool withInvalid) const | ||
const std::list<NoteStorage::Ptr> NoteManager::prioritizedStorages(bool withInvalid) const | ||
{ | ||
if (!_prioCache.size()) { | ||
|
||
|
@@ -161,12 +162,12 @@ const QLinkedList<NoteStorage::Ptr> NoteManager::prioritizedStorages(bool withIn | |
for (auto code : _priorities) { | ||
auto storage = storages.take(code); | ||
if (storage) { | ||
_prioCache.append(storage); | ||
_prioCache.push_back(storage); | ||
} | ||
} | ||
|
||
for (auto storage : storages) { | ||
_prioCache.append(storage); | ||
_prioCache.push_back(storage); | ||
} | ||
} | ||
|
||
|
@@ -177,7 +178,7 @@ const QLinkedList<NoteStorage::Ptr> NoteManager::prioritizedStorages(bool withIn | |
decltype(_prioCache) ret; | ||
for (auto storage : _prioCache) { | ||
if (storage->isAccessible()) { | ||
ret.append(storage); | ||
ret.push_back(storage); | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,14 +22,15 @@ E-Mail: [email protected] XMPP: [email protected] | |
#ifndef NOTEMANAGER_H | ||
#define NOTEMANAGER_H | ||
|
||
#include <QLinkedList> | ||
#include "notestorage.h" | ||
#include "qtnote_export.h" | ||
|
||
#include <QMap> | ||
#include <QObject> | ||
#include <QPointer> | ||
#include <QSet> | ||
|
||
#include "notestorage.h" | ||
#include "qtnote_export.h" | ||
#include <list> | ||
|
||
namespace QtNote { | ||
|
||
|
@@ -68,12 +69,12 @@ class QTNOTE_EXPORT NoteManager : public QObject { | |
Note note(const QString &storageId, const QString ¬eId); | ||
|
||
const QMap<QString, NoteStorage::Ptr> storages(bool withInvalid = false) const; | ||
const QLinkedList<NoteStorage::Ptr> prioritizedStorages(bool withInvalid = false) const; | ||
const std::list<NoteStorage::Ptr> prioritizedStorages(bool withInvalid = false) const; | ||
|
||
virtual NoteStorage::Ptr storage(const QString &storageId) const; // virtual for plugins | ||
inline NoteStorage::Ptr defaultStorage() const | ||
{ | ||
return prioritizedStorages().isEmpty() ? NoteStorage::Ptr() : prioritizedStorages().first(); | ||
return prioritizedStorages().empty() ? NoteStorage::Ptr() : prioritizedStorages().front(); | ||
} | ||
|
||
/* | ||
|
@@ -94,10 +95,10 @@ private slots: | |
private: | ||
NoteManager(QObject *parent); | ||
|
||
static NoteManager * _instance; | ||
QStringList _priorities; | ||
QMap<QString, NoteStorage::Ptr> _storages; | ||
mutable QLinkedList<NoteStorage::Ptr> _prioCache; | ||
static NoteManager * _instance; | ||
QStringList _priorities; | ||
QMap<QString, NoteStorage::Ptr> _storages; | ||
mutable std::list<NoteStorage::Ptr> _prioCache; | ||
}; | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,10 @@ E-Mail: [email protected] XMPP: [email protected] | |
#ifndef PLUGIN_HOST_INTERFACE_H | ||
#define PLUGIN_HOST_INTERFACE_H | ||
|
||
#include <QString> | ||
|
||
#include <memory> | ||
|
||
class QWidget; | ||
|
||
namespace QtNote { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.