diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-02-22 11:24:15 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-02-24 08:02:50 +0000 |
commit | 1d0ee8954825a38b789351558a04cbde04fa0490 (patch) | |
tree | daff1616958b99b0d8cadd990915a8646518aa25 /src/widgets/dialogs/qsidebar_p.h | |
parent | 09ca03e1aab7de1dbfcc61b3f95bbf2ede56f89e (diff) |
QSideBar: replace a QPair with a struct
Instead of the incomprehensible "names" .first and .second, the code
can now use .index and .path.
Change-Id: I1449ba668f703b9a8b9391b0a0774072c8c6e8aa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/widgets/dialogs/qsidebar_p.h')
-rw-r--r-- | src/widgets/dialogs/qsidebar_p.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qsidebar_p.h b/src/widgets/dialogs/qsidebar_p.h index 3e177e7e68..0685e81b2b 100644 --- a/src/widgets/dialogs/qsidebar_p.h +++ b/src/widgets/dialogs/qsidebar_p.h @@ -108,9 +108,16 @@ private: void changed(const QString &path); void addIndexToWatch(const QString &path, const QModelIndex &index); QFileSystemModel *fileSystemModel; - QVector<QPair<QModelIndex, QString> > watching; + struct WatchItem { + QModelIndex index; + QString path; + }; + friend class QTypeInfo<WatchItem>; + + QVector<WatchItem> watching; QList<QUrl> invalidUrls; }; +Q_DECLARE_TYPEINFO(QUrlModel::WatchItem, Q_MOVABLE_TYPE); class Q_AUTOTEST_EXPORT QSidebar : public QListView { |