Kerberos: add kerberos_inject_longterm_key() helper function
[wireshark-sm.git] / ui / qt / recent_file_status.cpp
blobc26cf488442d7c7e991c4f31b27aea3f18f87260
1 /* recent_file_status.cpp
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
10 #include "recent_file_status.h"
12 RecentFileStatus::RecentFileStatus(const QString filename, QObject *parent) :
13 QObject(parent),
14 // Force a deep copy.
15 filename_(QString::fromStdU16String(filename.toStdU16String()))
17 // We're a QObject, which means that we emit a destroyed signal,
18 // which might happen at the wrong time when automatic deletion is
19 // enabled. This will trigger an assert in debug builds (bug 14279).
20 setAutoDelete(false);
21 // Qt::QueuedConnection creates a copy of our argument list. This
22 // squelches what appears to be a ThreadSanitizer false positive.
23 connect(this, SIGNAL(statusFound(QString, qint64, bool)),
24 parent, SLOT(itemStatusFinished(QString, qint64, bool)), Qt::QueuedConnection);
27 void RecentFileStatus::run() {
28 fileinfo_.setFile(filename_);
30 if (fileinfo_.isFile() && fileinfo_.isReadable()) {
31 emit statusFound(filename_, fileinfo_.size(), true);
32 } else {
33 emit statusFound(filename_, 0, false);
35 deleteLater();