Commit a9ea6e1e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compiles without deprecated method

parent f1dfb6a0
...@@ -47,7 +47,10 @@ add_definitions(-DQT_USE_QSTRINGBUILDER) ...@@ -47,7 +47,10 @@ add_definitions(-DQT_USE_QSTRINGBUILDER)
#add_definitions(-DQT_NO_CAST_FROM_ASCII) #add_definitions(-DQT_NO_CAST_FROM_ASCII)
#add_definitions(-DQT_NO_CAST_TO_ASCII) #add_definitions(-DQT_NO_CAST_TO_ASCII)
#add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000) #add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
endif()
find_package(Sensors) find_package(Sensors)
set_package_properties(Sensors PROPERTIES set_package_properties(Sensors PROPERTIES
......
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
#include <QDebug> #include <QDebug>
#include <QIcon> #include <QIcon>
#include <QLineEdit>
#include <QMimeData> #include <QMimeData>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <KLocalizedString> #include <KLocalizedString>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <ksgrd/SensorManager.h> #include <ksgrd/SensorManager.h>
#include <kfilterproxysearchline.h>
#include "SensorBrowser.h" #include "SensorBrowser.h"
//#define SENSOR_MODEL_DO_TEST //#define SENSOR_MODEL_DO_TEST
...@@ -410,8 +410,10 @@ SensorBrowserWidget::SensorBrowserWidget( QWidget* parent, KSGRD::SensorManager* ...@@ -410,8 +410,10 @@ SensorBrowserWidget::SensorBrowserWidget( QWidget* parent, KSGRD::SensorManager*
{ {
QVBoxLayout *layout = new QVBoxLayout; QVBoxLayout *layout = new QVBoxLayout;
m_treeWidget = new SensorBrowserTreeWidget(this, sm); m_treeWidget = new SensorBrowserTreeWidget(this, sm);
KFilterProxySearchLine * search_line = new KFilterProxySearchLine(this); QLineEdit * search_line = new QLineEdit(this);
search_line->setProxy(&m_treeWidget->model()); connect(search_line, &QLineEdit::textChanged, this, [this](const QString &text) {
m_treeWidget->model().setFilterFixedString(text);
});
layout->addWidget(search_line); layout->addWidget(search_line);
layout->addWidget(m_treeWidget); layout->addWidget(m_treeWidget);
setLayout(layout); setLayout(layout);
......
...@@ -75,7 +75,7 @@ static const char Description[] = I18N_NOOP( "KDE System Monitor" ); ...@@ -75,7 +75,7 @@ static const char Description[] = I18N_NOOP( "KDE System Monitor" );
TopLevel* Toplevel; TopLevel* Toplevel;
TopLevel::TopLevel() TopLevel::TopLevel()
: KXmlGuiWindow( nullptr, Qt::WindowFlags(KDE_DEFAULT_WINDOWFLAGS) | Qt::WindowContextHelpButtonHint) : KXmlGuiWindow( nullptr, Qt::WindowFlags() | Qt::WindowContextHelpButtonHint)
{ {
QDBusConnection::sessionBus().registerObject(QStringLiteral("/"), this, QDBusConnection::ExportScriptableSlots); QDBusConnection::sessionBus().registerObject(QStringLiteral("/"), this, QDBusConnection::ExportScriptableSlots);
mTimerId = -1; mTimerId = -1;
......
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