aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/recent_file_status.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2014-07-09 14:31:44 -0700
committerGerald Combs <gerald@wireshark.org>2014-07-09 21:39:41 +0000
commitda3634a01f70d5f31182fe8363ac7285992ede2e (patch)
treec787d8126fd1cbeeb82b0fe4b602040b55234c4c /ui/qt/recent_file_status.h
parentcdc1c16bb72ef4dc2044068ff9555e1a866e60c4 (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.h4
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: