diff options
| author | in1tiate <32779090+in1tiate@users.noreply.github.com> | 2025-01-11 01:54:56 -0600 |
|---|---|---|
| committer | in1tiate <32779090+in1tiate@users.noreply.github.com> | 2025-01-11 01:54:56 -0600 |
| commit | ca660cc439bdde765cdf2cfcdaacbaf41d86f719 (patch) | |
| tree | c5553fea227a0b2f2ca7d29d44950c8f783ee289 | |
| parent | 4dae73c848bba1e44abf5a37d41034ded25cf28a (diff) | |
make range-for const
| -rw-r--r-- | src/aoapplication.h | 2 | ||||
| -rw-r--r-- | src/scrolltext.h | 13 | ||||
| -rw-r--r-- | src/text_file_functions.cpp | 2 |
3 files changed, 11 insertions, 6 deletions
diff --git a/src/aoapplication.h b/src/aoapplication.h index 6022ca1d..1386ff10 100644 --- a/src/aoapplication.h +++ b/src/aoapplication.h @@ -43,7 +43,7 @@ public: inline VPath operator+(const VPath &str) const { return VPath(this->toQString() + str.toQString()); } }; -inline size_t qHash(const VPath &key, uint seed = qGlobalQHashSeed()) +inline size_t qHash(const VPath &key, uint seed = QHashSeed::globalSeed()) { return qHash(key.toQString(), seed); } diff --git a/src/scrolltext.h b/src/scrolltext.h index 4571e25e..83b65aa1 100644 --- a/src/scrolltext.h +++ b/src/scrolltext.h @@ -10,17 +10,22 @@ class ScrollText : public QWidget { Q_OBJECT - Q_PROPERTY(QString text READ text WRITE setText) - Q_PROPERTY(QString separator READ separator WRITE setSeparator) + Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) + Q_PROPERTY(QString separator READ separator WRITE setSeparator NOTIFY separatorChanged) public: explicit ScrollText(QWidget *parent = nullptr); -public Q_SLOTS: QString text() const; + QString separator() const; + +signals: + void textChanged(QString newText); + void separatorChanged(QString newSeparator); + +public Q_SLOTS: void setText(QString text); - QString separator() const; void setSeparator(QString separator); protected: diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index 1988482c..91660c99 100644 --- a/src/text_file_functions.cpp +++ b/src/text_file_functions.cpp @@ -144,7 +144,7 @@ QMultiMap<QString, QString> AOApplication::load_demo_logs_list() const l_demo_folder.setFilter(QDir::Files); l_demo_folder.setNameFilters(QStringList() << "*.demo"); - for (QString l_demo_name : l_demo_folder.entryList()) + for (const QString &l_demo_name : l_demo_folder.entryList()) { l_demo_logs.insert(l_demo_folder_name, l_demo_name); } |
