Cleanup includes

This commit is contained in:
Tobias Fella
2024-05-05 21:49:43 +02:00
parent 53e3c36f7e
commit c3de788956
12 changed files with 14 additions and 37 deletions

View File

@@ -11,7 +11,6 @@
#include <Quotient/events/stickerevent.h> #include <Quotient/events/stickerevent.h>
#include <KLocalizedString> #include <KLocalizedString>
#include <qlist.h>
#ifndef Q_OS_ANDROID #ifndef Q_OS_ANDROID
#include <KSyntaxHighlighting/Definition> #include <KSyntaxHighlighting/Definition>

View File

@@ -11,8 +11,6 @@
#include "enums/messagecomponenttype.h" #include "enums/messagecomponenttype.h"
#include "eventhandler.h" #include "eventhandler.h"
#include "itinerarymodel.h" #include "itinerarymodel.h"
#include "linkpreviewer.h"
#include "neochatroom.h"
struct MessageComponent { struct MessageComponent {
MessageComponentType::Type type = MessageComponentType::Other; MessageComponentType::Type type = MessageComponentType::Other;

View File

@@ -4,7 +4,7 @@
#include "roomlistmodel.h" #include "roomlistmodel.h"
#include "eventhandler.h" #include "eventhandler.h"
#include "neochatconfig.h" #include "neochatconnection.h"
#include "neochatroom.h" #include "neochatroom.h"
#include "roommanager.h" #include "roommanager.h"
#include "spacehierarchycache.h" #include "spacehierarchycache.h"

View File

@@ -46,7 +46,6 @@
#include "spacehierarchycache.h" #include "spacehierarchycache.h"
#include "texthandler.h" #include "texthandler.h"
#include "urlhelper.h" #include "urlhelper.h"
#include "utils.h"
#ifndef Q_OS_ANDROID #ifndef Q_OS_ANDROID
#include <KIO/Job> #include <KIO/Job>

View File

@@ -6,7 +6,6 @@
#include <QDBusMetaType> #include <QDBusMetaType>
#include "controller.h" #include "controller.h"
#include "neochatroom.h"
#include "roomlistmodel.h" #include "roomlistmodel.h"
#include "roommanager.h" #include "roommanager.h"
#include "sortfilterroomlistmodel.h" #include "sortfilterroomlistmodel.h"
@@ -43,17 +42,6 @@ Runner::Runner()
qDBusRegisterMetaType<RemoteImage>(); qDBusRegisterMetaType<RemoteImage>();
} }
void Runner::setRoomListModel(RoomListModel *roomListModel)
{
m_model->setSourceModel(roomListModel);
Q_EMIT roomListModelChanged();
}
RoomListModel *Runner::roomListModel() const
{
return dynamic_cast<RoomListModel *>(m_model->sourceModel());
}
RemoteActions Runner::Actions() RemoteActions Runner::Actions()
{ {
return {}; return {};

View File

@@ -165,10 +165,6 @@ class Runner : public QObject, protected QDBusContext
{ {
Q_OBJECT Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.kde.krunner1") Q_CLASSINFO("D-Bus Interface", "org.kde.krunner1")
QML_ELEMENT
QML_SINGLETON
Q_PROPERTY(RoomListModel *roomListModel READ roomListModel WRITE setRoomListModel NOTIFY roomListModelChanged)
public: public:
static Runner *create(QQmlEngine *engine, QJSEngine *) static Runner *create(QQmlEngine *engine, QJSEngine *)
{ {
@@ -194,9 +190,6 @@ public:
*/ */
Q_SCRIPTABLE void Run(const QString &id, const QString &actionId); Q_SCRIPTABLE void Run(const QString &id, const QString &actionId);
void setRoomListModel(RoomListModel *roomListModel);
RoomListModel *roomListModel() const;
Q_SIGNALS: Q_SIGNALS:
void roomListModelChanged(); void roomListModelChanged();

View File

@@ -3,13 +3,14 @@
#include "spacehierarchycache.h" #include "spacehierarchycache.h"
#include <Quotient/csapi/space_hierarchy.h>
#include <Quotient/qt_connection_util.h> #include <Quotient/qt_connection_util.h>
#include <KConfigGroup> #include <KConfigGroup>
#include <KSharedConfig> #include <KSharedConfig>
#include "neochatconnection.h"
#include "neochatroom.h" #include "neochatroom.h"
#include "neochatroomtype.h"
#include "roomlistmodel.h" #include "roomlistmodel.h"
using namespace Quotient; using namespace Quotient;

View File

@@ -10,15 +10,14 @@
#include <QQmlEngine> #include <QQmlEngine>
#include <QString> #include <QString>
#include <Quotient/csapi/space_hierarchy.h>
#include "neochatconnection.h"
namespace Quotient namespace Quotient
{ {
class Room; class Room;
class GetSpaceHierarchyJob;
} }
class NeoChatConnection;
/** /**
* @class SpaceHierarchyCache * @class SpaceHierarchyCache
* *

View File

@@ -3,11 +3,8 @@
#pragma once #pragma once
#include <QHash>
#include <QObject> #include <QObject>
#include <QRegularExpression>
#include <QString> #include <QString>
#include <QStringList>
#include "models/messagecontentmodel.h" #include "models/messagecontentmodel.h"
#include "neochatroom.h" #include "neochatroom.h"

View File

@@ -14,8 +14,14 @@
#endif #endif
#include <KSharedConfig> #include <KSharedConfig>
#include <QQuickWindow>
#include <QStandardPaths> #include <QStandardPaths>
#ifdef HAVE_WINDOWSYSTEM
#include <KWindowEffects>
#endif
WindowController &WindowController::instance() WindowController &WindowController::instance()
{ {
static WindowController instance; static WindowController instance;

View File

@@ -6,10 +6,7 @@
#include <QObject> #include <QObject>
#include <QQmlEngine> #include <QQmlEngine>
#include <QQuickItem> #include <QQuickItem>
#include <QQuickWindow>
#ifdef HAVE_WINDOWSYSTEM
#include <KWindowEffects>
#endif
/** /**
* @class WindowController * @class WindowController
* *