Commit d7a5f72c authored by David Edmundson's avatar David Edmundson

[ksgrd] Drop a QWidget dependency

Summary:
The broadcaster just needs to receive a QEvent getting propogated
upwards, it doesn't need to be a QWidget.

This makes the client API considerably lighter.

.so is bumped as it is technically an ABI break.

Test Plan:
Ksysguard still works
lddtree shows everything being much lighter

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26870
parent 4bf07806
......@@ -56,7 +56,7 @@ ecm_setup_version(${PROJECT_VERSION}
VARIABLE_PREFIX KSYSGUARD
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/ksysguard_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5SysGuardConfigVersion.cmake"
SOVERSION 7
SOVERSION 8
)
find_package(X11)
......
......@@ -26,13 +26,11 @@ target_include_directories(ksgrd
target_link_libraries(ksgrd
PUBLIC
Qt5::Core
Qt5::Widgets # QWidget in SensorManager.h
Qt5::Network # QTcpSocket in SensorSocketAgent.h
KF5::ConfigCore # KConfigGroup in SensorManager.h
PRIVATE
KF5::I18n
KF5::CoreAddons
KF5::ConfigWidgets
KF5::ProcessCore
)
......
......@@ -21,10 +21,9 @@
*/
#include <QApplication>
#include <QCoreApplication>
#include <QDebug>
#include <klocalizedstring.h>
#include <QWidget>
#include <QEvent>
#include <kconfiggroup.h>
#include "ksgrd_debug.h"
......@@ -345,7 +344,7 @@ void SensorManager::notify( const QString &msg ) const
}
}
void SensorManager::setBroadcaster( QWidget *wdg )
void SensorManager::setBroadcaster( QObject *wdg )
{
mBroadcaster = wdg;
}
......
......@@ -78,7 +78,7 @@ class Q_DECL_EXPORT SensorManager : public QObject
bool resynchronize( const QString &hostName );
void notify( const QString &msg ) const;
void setBroadcaster( QWidget *wdg );
void setBroadcaster( QObject *wdg );
bool sendRequest( const QString &hostName, const QString &request,
SensorClient *client, int id = 0 );
......@@ -124,7 +124,7 @@ class Q_DECL_EXPORT SensorManager : public QObject
QStringList mHostList;
QStringList mCommandList;
QPointer<QWidget> mBroadcaster;
QPointer<QObject> mBroadcaster;
};
Q_DECL_EXPORT extern SensorManager* SensorMgr;
......
Markdown is supported
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