Skip to content

Commit

Permalink
Remove unused X11 dep (#235)
Browse files Browse the repository at this point in the history
* Remove unused X11 dep

* Clazy fixes, 1st step

* Partially reverting previous commit.
  • Loading branch information
adjamhub committed Feb 21, 2021
1 parent a372833 commit 231759d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Expand Up @@ -23,7 +23,6 @@ find_package(Qt5DBus ${QT_MINIMUM_VERSION} REQUIRED)
find_package(Qt5LinguistTools ${QT_MINIMUM_VERSION} REQUIRED)
find_package(Qt5Svg ${QT_MINIMUM_VERSION} REQUIRED)
find_package(Qt5Widgets ${QT_MINIMUM_VERSION} REQUIRED)
find_package(Qt5X11Extras ${QT_MINIMUM_VERSION} REQUIRED)
find_package(KF5IdleTime ${KF5_MINIMUM_VERSION} REQUIRED)
find_package(KF5Solid ${KF5_MINIMUM_VERSION} REQUIRED)
find_package(lxqt ${LXQT_MINIMUM_VERSION} REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
@@ -1,6 +1,6 @@
project(lxqt-powermanagement)

set(QTX_LIBRARIES Qt5::Widgets Qt5::DBus Qt5::Svg Qt5::X11Extras)
set(QTX_LIBRARIES Qt5::Widgets Qt5::DBus Qt5::Svg)

set(SOURCES
watcher.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/batteryinfoframe.cpp
Expand Up @@ -44,7 +44,7 @@ BatteryInfoFrame::BatteryInfoFrame(Solid::Battery *battery) :
mUi->typeValue->setText(BatteryHelper::typeToString(mBattery->type()));
mUi->technologyValue->setText(BatteryHelper::technologyToString(mBattery->technology()));

QString vendor = QString::fromLatin1("%1 %2").arg(battery->recallVendor()).arg(battery->serial());
QString vendor = QString::fromLatin1("%1 %2").arg( battery->recallVendor() , battery->serial() );
if (vendor.trimmed().isEmpty())
vendor = QSL("Unknown");
mUi->vendorValue->setText(vendor);
Expand Down
4 changes: 2 additions & 2 deletions src/idlenesswatcher.cpp
Expand Up @@ -141,7 +141,7 @@ void IdlenessWatcher::timeoutReached(int identifier,int /*msec*/)
if(identifier == mIdleBacklightWatcher && mBacklightActualValue < 0) {
if(mBacklight == nullptr) {
mBacklight = new LXQt::Backlight();
connect(mBacklight, &QObject::destroyed, [this](QObject *) {mBacklight = nullptr;} );
connect(mBacklight, &QObject::destroyed, this, [this](QObject *) {mBacklight = nullptr;} );
}

//LXQt::Notification::notify(QStringLiteral("IdlenessWatcher::timeoutReached"),
Expand All @@ -165,7 +165,7 @@ void IdlenessWatcher::resumingFromIdle()
if(mPSettings.isIdlenessBacklightWatcherEnabled()) {
if(mBacklight == nullptr) {
mBacklight = new LXQt::Backlight();
connect(mBacklight, &QObject::destroyed, [this](QObject *) {mBacklight = nullptr;} );
connect(mBacklight, &QObject::destroyed, this, [this](QObject *) {mBacklight = nullptr;} );
}

if(mBacklight->isBacklightAvailable() && !mBacklight->isBacklightOff())
Expand Down

0 comments on commit 231759d

Please sign in to comment.