Commit c4bd83c1 authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

Fix query dialogs with Qt6

When emitting the userQuery signal with ark compiled against Qt6, Qt
complains (rightly so) that it doesn't know the metatype `Kerfuffle:Query*`:

[76892 - qt.core.qobject.connect] unknown(): QObject::connect: Cannot queue arguments of type 'Kerfuffle::Query*'
(Make sure 'Kerfuffle::Query*' is registered using qRegisterMetaType().)

This commit fixes that and restores query dialogs with Qt6.
parent 09c8b571
Pipeline #257897 passed with stage
in 2 minutes and 23 seconds
......@@ -10,6 +10,7 @@
#include "archiveinterface.h"
#include "ark_debug.h"
#include "mimetypes.h"
#include "jobs.h"
#include <QDir>
#include <QFileInfo>
......@@ -28,6 +29,7 @@ ReadOnlyArchiveInterface::ReadOnlyArchiveInterface(QObject *parent, const QVaria
, m_unpackedSize(0)
{
Q_ASSERT(args.size() >= 2);
qRegisterMetaType<Kerfuffle::Query*>();
qCDebug(ARK) << "Created read-only interface for" << args.first().toString();
m_filename = args.first().toString();
......
......@@ -120,4 +120,6 @@ private:
}
Q_DECLARE_METATYPE(Kerfuffle::Query*)
#endif /* ifndef QUERIES_H */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment