KRunner

runnermodelplugin.cpp
1 /*
2  SPDX-FileCopyrightText: 2011 Marco Martin <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "runnermodelplugin.h"
8 
9 #include <QQmlEngine>
10 
11 #include "krunner_debug.h"
12 
13 #include <KRunner/QueryMatch>
14 
15 #include "runnermodel.h"
16 
17 void RunnerModelPlugin::registerTypes(const char *uri)
18 {
19  qCWarning(KRUNNER) << "Using deprecated import org.kde.runnermodel, please port to org.kde.plasma.core";
20  Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.runnermodel"));
21  qmlRegisterType<RunnerModel>(uri, 2, 0, "RunnerModel");
22  // to port this to Qt5.15-non-deprecated variant
23  // qmlRegisterInterface<Plasma::QueryMatch>(uri, 1);
24  // QueryMatch would need to get a Q_GAGDET added just for this
25  // As this plugin is deprecated, this is not worth it,
26  // so we just disable the deprecation warning
27  QT_WARNING_PUSH
28  QT_WARNING_DISABLE_CLANG("-Wdeprecated-declarations")
29  QT_WARNING_DISABLE_GCC("-Wdeprecated-declarations")
30  qmlRegisterInterface<Plasma::QueryMatch>("QueryMatch");
31  QT_WARNING_POP
32  qRegisterMetaType<Plasma::QueryMatch *>("QueryMatch");
33 }
34 
35 #include "moc_runnermodelplugin.cpp"
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Dec 2 2023 03:51:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.