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)
#add_definitions(-DQT_NO_CAST_FROM_ASCII)
#add_definitions(-DQT_NO_CAST_TO_ASCII)
#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)
set_package_properties(Sensors PROPERTIES
......
......@@ -22,13 +22,13 @@
#include <QDebug>
#include <QIcon>
#include <QLineEdit>
#include <QMimeData>
#include <QVBoxLayout>
#include <KLocalizedString>
#include <kmessagebox.h>
#include <ksgrd/SensorManager.h>
#include <kfilterproxysearchline.h>
#include "SensorBrowser.h"
//#define SENSOR_MODEL_DO_TEST
......@@ -410,8 +410,10 @@ SensorBrowserWidget::SensorBrowserWidget( QWidget* parent, KSGRD::SensorManager*
{
QVBoxLayout *layout = new QVBoxLayout;
m_treeWidget = new SensorBrowserTreeWidget(this, sm);
KFilterProxySearchLine * search_line = new KFilterProxySearchLine(this);
search_line->setProxy(&m_treeWidget->model());
QLineEdit * search_line = new QLineEdit(this);
connect(search_line, &QLineEdit::textChanged, this, [this](const QString &text) {
m_treeWidget->model().setFilterFixedString(text);
});
layout->addWidget(search_line);
layout->addWidget(m_treeWidget);
setLayout(layout);
......
......@@ -75,7 +75,7 @@ static const char Description[] = I18N_NOOP( "KDE System Monitor" );
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);
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