diff options
author | Gerald Combs <gerald@wireshark.org> | 2014-07-09 14:31:44 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2014-07-09 21:39:41 +0000 |
commit | da3634a01f70d5f31182fe8363ac7285992ede2e (patch) | |
tree | c787d8126fd1cbeeb82b0fe4b602040b55234c4c /ui/qt/recent_file_status.h | |
parent | cdc1c16bb72ef4dc2044068ff9555e1a866e60c4 (diff) |
Fix a "recent items" crash.
Use a QMutableListIterator instead of a foreach loop so that we can
safely remove items from a list.
While we're here, make sure that RecentFileStatus threads use a
Qt::QueuedConnection when emitting signals across threads and try to
isolate the filename string.
Change-Id: I3fbb65a1727133f4557026decab5084a3faec2d4
Reviewed-on: https://code.wireshark.org/review/2966
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/recent_file_status.h')
-rw-r--r-- | ui/qt/recent_file_status.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/qt/recent_file_status.h b/ui/qt/recent_file_status.h index 70800b8f35..b3cef5c9dd 100644 --- a/ui/qt/recent_file_status.h +++ b/ui/qt/recent_file_status.h @@ -28,7 +28,7 @@ class RecentFileStatus : public QObject { Q_OBJECT public: - RecentFileStatus(const QString &filename, QObject *parent = 0) : + RecentFileStatus(const QString filename, QObject *parent = 0) : QObject(parent), filename_(filename), size_(0) {} QString getFilename() const { return (filename_); } @@ -40,7 +40,7 @@ private: size_t size_; signals: - void statusFound(const QString &filename = *new QString(), qint64 size = 0, bool accessible = false); + void statusFound(const QString filename = QString(), qint64 size = 0, bool accessible = false); void finished(); public slots: |