...
 
Commits (8)
  • Alf Gaida's avatar
    Some updates in debian $foo · a845eb84
    Alf Gaida authored
    * Fixed Hompage and Source to lxqt
    * Bumped compat to 11
    * Bumped debhelper to >= 11~
    * Bumped Standards to 4.1.4, no changes needed
    * Changed VCS fields for salsa
    * Bumped year in copyright
    a845eb84
  • Alf Gaida's avatar
    Really fix VCS-Git and watch file · 7369d9e6
    Alf Gaida authored
    7369d9e6
  • Alf Gaida's avatar
    Cherry-picking upstream version 0.12.0. · 5f9316ac
    Alf Gaida authored
    * Bumped build dependencies liblqt5xdg* to >= 3.2.0~
    * Bumpde build dependency lxqt-build-tools to >= 0.5.0~
    * Fixed symbols for the new release
    * Added lintian overrides for the helper scripts and configurations
    * Removed multiarch=same - packages will not be co-installable anymore
    * Moved debian/.gitignore to ./.gitignore
    5f9316ac
  • Alf Gaida's avatar
    Cherry-picking upstream version 0.14.0. · d536bc89
    Alf Gaida authored
    * Added Build-Depends-Package: liblxqt0-dev to d/liblxqt0-dev.symbols
    * Dropped d/compat, use debhelper-compat = 12, no changes needed
    * Fixed years in d/copyright
    * Bumped minimum version libqt5xdg-dev (>= 3.3.0~)
    * Bumped minimum version libqt5xdgiconloader-dev (>= 3.3.0~)
    * Bumped minimum version lxqt-build-tools (>= 0.6.0~)
    * Removed obsolete PULL_TRANSLATIONS= OFF from dh_auto_configure
    * Added l10n-package, moved from lxqt-l10n
    * Added d/upstream/metadata
    d536bc89
  • Alf Gaida's avatar
    Cherry-picking upstream version 0.14.1. · 435a0f34
    Alf Gaida authored
    * Bumped minimum version libqt5xdg-dev (>= 3.3.1~)
    * Bumped minimum version libqt5xdgiconloader-dev (>= 3.3.1~)
    * Added new symbol
    435a0f34
  • Alf Gaida's avatar
    ae9f667c
  • Alf Gaida's avatar
    Modified debian/rules for Hurd. · 8497af06
    Alf Gaida authored
    8497af06
  • Alf Gaida's avatar
    Refined backlight handling for hurd and kfreebsd · c6e62790
    Alf Gaida authored
    * Added kfreebsd as non-linux to rules
    * New build dependency dh-exec
    * Don't install backlight things for hurd and kfreebsd
    * Prepared helper package
    c6e62790
debian/*.debhelper
debian/*.log
debian/*.mangled
debian/*.substvars
debian/debhelper-build-stamp
debian/files
debian/liblxqt0/
debian/liblxqt0-dev/
debian/tmp
Upstream Authors:
LXQt team: http://lxqt.org
LXQt team: https://lxqt.org
Razor team: http://razor-qt.org
Copyright:
Copyright (c) 2010-2012 Razor team
Copyright (c) 2012-2017 LXQt team
Copyright (c) 2012-2018 LXQt team
License: LGPL-2.1+ and BSD-3-clause
The full text of the LGPL-2.1+ licenses can be found in the 'COPYING' file.
......
liblxqt-0.14.1 / 2019-02-24
===========================
* Bumped version to 0.14.1
* Enable/disable a standard button if it exists. This is needed for adding
Apply button later because Apply button should be enabled/disabled
appropriately.
* Updated translations
* Note for packagers: liblxqt now depend on libqtxdg 3.3.1
liblxqt-0.14.0 / 2019-01-25
===========================
liblxqt-0.12.0 / 2017-10-21
* Implementation fixed:
- Added missing text color of our HTML delegate
- Use the new signal and slot syntax
- Don't use automatic string conversions
- lxqtbacklight: centralize fopen() and perform path handling with length checks
- lxqtbacklight: apply maximum string length to fscanf to prevent overflow
- lxqtbacklight: removed useless commented out code
- lxqtbacklight: constified char *driver, where appropriate
- lxqtbacklight: centralized error output on empty backlight dir
- lxqtbacklight: fix and improve command line parameter handling
- lxqtbacklight: only pass basename into open_driver_file()
- lxqt-backlight: Simplify string construction
- lxqthtmldelegate: Position, alignment and size fixes for HTML delegate
- lxqtpageselectwidget: Fix config dialog cell height
- lxqtpageselectwidget: Fixed config dialog select widget cells
* Improved cmake scripting
- Set cmake_minimum_required to 3.1.0
- Removed locale compile definitons
* Moved translations from lxqt-l10n back to liblxqt
- Removed obsolete translation fuctionality
- Added translation promo in README.md
* Translation updates
liblxqt-0.13.0 / 2018-05-21
===========================
* Bump minor version to 13 and fix the comment
* Don't find packages quietly
* Use PolkitQt5-1 policy files install directory
* build: Don't use hardcoded /usr/share path
* Normalize backlight value
* lxqtbacklight: Remove not used code
* CMake: Prevent in-source builds
* lxqtbacklight: Fix a FTBFS in superbuild mode
* blacklight power control has been added.
* Backlight::isBacklightAvailable returns false if the screen is turned off.
* Back light control added.
* Adds a ConfigDialogCommandLineOptions class
* ConfigDialog: Adds the ability to select the shown page by name
* ConfigDialog: Use d-pointer design pattern
* Fixed project uris to https://lxqt.org
* Fixed some mentions of lxde
* Make lxqt globals a public header
* Adds Qt Strings abbreviations
* lxqtpower: Add support for turning monitor(s) off
* Use qAsConst()
* Drop foreach use
* cmake: Handle CMP0071
0.12.0 / 2017-10-21
===================
* Release 0.12.0: Update changelog
* Bump minimum qtxdg version to 3.1.0
* Don't export github templates
* Bump version and needed versions to the final values
......
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
# CMP0000: Call the cmake_minimum_required() command at the beginning of the top-level
# CMakeLists.txt file even before calling the project() command.
# The cmake_minimum_required(VERSION) command implicitly invokes the cmake_policy(VERSION)
# command to specify that the current project code is written for the given range of CMake
# versions.
project(liblxqt)
set(QT_MINIMUM_VERSION "5.5.0")
set(QTXDG_MINIMUM_VERSION "3.1.0")
set(LXQTBT_MINIMUM_VERSION "0.4.0")
set(LXQTBT_MINIMUM_VERSION "0.6.0")
set(KF5_MINIMUM_VERSION "5.36.0")
set(QT_MINIMUM_VERSION "5.7.1")
set(QTXDG_MINIMUM_VERSION "3.3.1")
# Major LXQt Version, belong to all components
set(LXQT_MAJOR_VERSION 0)
# Minor LXQt Version, belong to all components
set(LXQT_MINOR_VERSION 12)
set(LXQT_MINOR_VERSION 14)
#
# Patch Version, belong *only* to the component
# LXQt is 0.11 - liblxqt is at patch version 1
# LXQt is 0.13 - liblxqt is at patch version 0
# The official LXQt version will follow liblxqt.
#
# In a perfect world all components would have the same major- and minor- and
# patch-version as liblxqt - in real life it will be fine if every component
# has it's own patch version within a major/minor life cyle.
#
set(LXQT_PATCH_VERSION 0)
set(LXQT_PATCH_VERSION 1)
set(LXQT_VERSION ${LXQT_MAJOR_VERSION}.${LXQT_MINOR_VERSION}.${LXQT_PATCH_VERSION})
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED)
find_package(Qt5 ${QT_MINIMUM_VERSION} CONFIG REQUIRED Widgets DBus X11Extras LinguistTools)
find_package(Qt5Xdg ${QTXDG_MINIMUM_VERSION} REQUIRED)
find_package(KF5WindowSystem ${KF5_MINIMUM_VERSION} REQUIRED)
find_package(PolkitQt5-1 REQUIRED)
find_package(X11 REQUIRED)
message(STATUS "Building ${PROJECT_NAME} with Qt ${Qt5Core_VERSION}")
include(CMakePackageConfigHelpers)
include(GNUInstallDirs) # Standard directories for installation
#-----------------------------------------------------------------------------
# Release is the default build type
#-----------------------------------------------------------------------------
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
add_subdirectory(lxqtbacklight/linux_backend/driver)
set(LXQT_PKG_CONFIG_DESCRIPTION "Shared library for LXQt applications")
......@@ -46,6 +64,7 @@ set(PUB_HDRS
lxqtprogramfinder.h
configdialog/lxqtconfigdialog.h
configdialog/lxqtconfigdialogcmdlineoptions.h
configdialog/lxqtpageselectwidget.h
lxqtpower/lxqtpower.h
......@@ -54,6 +73,9 @@ set(PUB_HDRS
lxqtgridlayout.h
lxqtrotatedwidget.h
lxqtglobals.h
lxqtbacklight.h
#lxqtbacklight/virtual_backend.h
#lxqtbacklight/linux_backend/linuxbackend.h
)
set(PUBLIC_CLASSES
......@@ -68,6 +90,7 @@ set(PUBLIC_CLASSES
ProgramFinder
ConfigDialog
ConfigDialogCmdLineOptions
PageSelectWidget
Power
......@@ -75,6 +98,8 @@ set(PUBLIC_CLASSES
AutostartEntry
GridLayout
RotatedWidget
Globals
Backlight
)
set(SRCS
......@@ -89,6 +114,7 @@ set(SRCS
lxqtprogramfinder.cpp
configdialog/lxqtconfigdialog.cpp
configdialog/lxqtconfigdialogcmdlineoptions.cpp
configdialog/lxqtpageselectwidget.cpp
lxqtpower/lxqtpower.cpp
......@@ -97,6 +123,9 @@ set(SRCS
lxqtnotification.cpp
lxqtgridlayout.cpp
lxqtrotatedwidget.cpp
lxqtbacklight.cpp
lxqtbacklight/virtual_backend.cpp
lxqtbacklight/linux_backend/linuxbackend.cpp
)
set(MOCS
......@@ -105,8 +134,10 @@ set(MOCS
lxqtsettings.h
lxqtscreensaver.h
lxqtapplication.h
lxqtbacklight.h
configdialog/lxqtconfigdialog.h
configdialog/lxqtconfigdialog_p.h
configdialog/lxqtpageselectwidget.h
lxqtnotification.h
......@@ -115,43 +146,42 @@ set(MOCS
lxqtpower/lxqtpowerproviders.h
lxqtgridlayout.h
lxqtrotatedwidget.h
lxqtbacklight/virtual_backend.h
lxqtbacklight/linux_backend/linuxbackend.h
)
set(FORMS
configdialog/lxqtconfigdialog.ui
)
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
set(POLKIT_FILES
"${CMAKE_CURRENT_BINARY_DIR}/org.lxqt.backlight.pkexec.policy"
)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Build Polkit file
configure_file ( polkit/org.lxqt.backlight.pkexec.policy.in "${CMAKE_CURRENT_BINARY_DIR}/org.lxqt.backlight.pkexec.policy" )
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
file(GLOB LXQT_CONFIG_FILES resources/*.conf)
find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED)
find_package(X11 REQUIRED QUIET)
find_package(Qt5 ${QT_MINIMUM_VERSION} CONFIG REQUIRED Widgets DBus X11Extras LinguistTools)
find_package(Qt5Xdg ${QTXDG_MINIMUM_VERSION} REQUIRED)
find_package(KF5WindowSystem REQUIRED QUIET)
message(STATUS "Building ${PROJECT_NAME} with Qt ${Qt5Core_VERSION}")
QT5_ADD_DBUS_INTERFACE(SRCS
QT5_ADD_DBUS_INTERFACE(DBUS_INTERFACE_SRCS
dbus/org.freedesktop.Notifications.xml
notifications_interface
)
QT5_ADD_DBUS_ADAPTOR(SRCS
QT5_ADD_DBUS_ADAPTOR(DBUS_ADAPTOR_SRCS
dbus/org.lxqt.SingleApplication.xml
lxqtsingleapplication.h LXQt::SingleApplication
)
set_property(SOURCE ${DBUS_INTERFACE_SRCS} ${DBUS_ADAPTOR_SRCS} PROPERTY SKIP_AUTOGEN ON)
list(APPEND SRCS "${DBUS_INTERFACE_SRCS}" "${DBUS_ADAPTOR_SRCS}")
# KF5WindowSystem is missing here. KF5WindowSystem doesn't provide an .pc file.
set(LXQT_PKG_CONFIG_REQUIRES "Qt5Xdg >= ${QTXDG_MINIMUM_VERSION}, Qt5Widgets >= ${QT_MINIMUM_VERSION}, Qt5Xml >= ${QT_MINIMUM_VERSION}, Qt5DBus >= ${QT_MINIMUM_VERSION}, Qt5X11Extras >= ${QT_MINIMUM_VERSION}")
# Standard directories for installation
include(LXQtPreventInSourceBuilds)
include(LXQtCompilerSettings NO_POLICY_SCOPE)
include(LXQtCreatePkgConfigFile)
include(LXQtCreatePortableHeaders)
......@@ -174,14 +204,6 @@ lxqt_translate_ts(QM_FILES
${FORMS}
INSTALL_DIR
"${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}"
PULL_TRANSLATIONS
${PULL_TRANSLATIONS}
CLEAN_TRANSLATIONS
${CLEAN_TRANSLATIONS}
TRANSLATIONS_REPO
${TRANSLATIONS_REPO}
TRANSLATIONS_REFSPEC
${TRANSLATIONS_REFSPEC}
)
message(STATUS "")
......@@ -284,6 +306,11 @@ target_compile_definitions(${LXQT_LIBRARY_NAME}
"LXQT_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\""
"LXQT_VERSION=\"${LXQT_VERSION}\""
"COMPILE_LIBLXQT"
"QT_USE_QSTRINGBUILDER"
"QT_NO_CAST_FROM_ASCII"
"QT_NO_CAST_TO_ASCII"
"QT_NO_URL_CAST_FROM_STRING"
"QT_NO_CAST_FROM_BYTEARRAY"
"$<$<CONFIG:Release>:QT_NO_DEBUG_OUTPUT>"
"$<$<CONFIG:Release>:QT_NO_WARNING_OUTPUT>"
)
......@@ -331,6 +358,13 @@ install(FILES
COMPONENT Devel
)
install(FILES ${LXQT_CONFIG_FILES}
DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/lxqt"
COMPONENT Runtime
)
install(FILES ${POLKIT_FILES} DESTINATION "${POLKITQT-1_POLICY_FILES_INSTALL_DIR}")
#************************************************
# Create and install pkgconfig file
#************************************************
......
......@@ -2,19 +2,37 @@
## Overview
`liblxqt` represents the core library of LXQt providing essential functionality needed by nearly all of its components.
`liblxqt` represents the core library of LXQt providing essential functionality
needed by nearly all of its components.
## Installation
### Sources
Its runtime dependencies are libxss, KWindowSystem, qtbase, qtx11extras and [libqtxdg](https://github.com/lxde/libqtxdg).
Additional build dependencies are CMake and optionally Git to pull latest VCS checkouts. The localization files were outsourced to repository [lxqt-l10n](https://github.com/lxde/lxqt-l10n) so the corresponding dependencies are needed, too. Please refer to this repository's `README.md` for further information.
Its runtime dependencies are libxss, KWindowSystem, qtbase, qtx11extras and
[libqtxdg](https://github.com/lxqt/libqtxdg).
Additional build dependencies are CMake and optionally Git to pull latest VCS
checkouts. The localization files were outsourced to repository
[lxqt-l10n](https://github.com/lxqt/lxqt-l10n) so the corresponding dependencies
are needed, too. Please refer to this repository's `README.md` for further
information.
Code configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX` will normally have to be set to `/usr`, depending on the way library paths are dealt with on 64bit systems variables like `CMAKE_INSTALL_LIBDIR` may have to be set as well.
Code configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX`
will normally have to be set to `/usr`, depending on the way library paths are
dealt with on 64bit systems variables like `CMAKE_INSTALL_LIBDIR` may have to be
set as well.
To build run `make`, to install `make install` which accepts variable `DESTDIR` as usual.
To build run `make`, to install `make install` which accepts variable `DESTDIR`
as usual.
### Binary packages
The library is provided by all major Linux distributions like Arch Linux, Debian, Fedora and openSUSE. Just use your package manager to search for string `liblxqt`.
The library is provided by all major Linux distributions like Arch Linux, Debian,
Fedora and openSUSE. Just use your package manager to search for string `liblxqt`.
### Translation (Weblate)
<a href="https://weblate.lxqt.org/projects/lxqt/liblxqt/">
<img src="https://weblate.lxqt.org/widgets/lxqt/-/liblxqt/multi-auto.svg" alt="Translation status" />
</a>
......@@ -2,7 +2,7 @@
* (c)LGPL2+
*
* LXQt - a lightweight, Qt based, desktop toolset
* http://razor-qt.org
* https://lxqt.org
*
* Copyright (C) 2012 Alec Moskvin <alecm@gmx.com>
*
......@@ -23,34 +23,93 @@
* END_COMMON_COPYRIGHT_HEADER */
#include "lxqtconfigdialog.h"
#include "lxqtconfigdialog_p.h"
#include "ui_lxqtconfigdialog.h"
#include <XdgIcon>
#include <QPushButton>
#include "lxqtsettings.h"
using namespace LXQt;
ConfigDialogPrivate::ConfigDialogPrivate(ConfigDialog *q, Settings *settings)
: q_ptr(q),
mCache(new SettingsCache(settings)),
ui(new Ui::ConfigDialog)
{
init();
}
ConfigDialogPrivate::~ConfigDialogPrivate()
{
delete ui;
delete mCache;
}
void ConfigDialogPrivate::init()
{
Q_Q(ConfigDialog);
ui->setupUi(q);
QObject::connect(ui->buttons, &QDialogButtonBox::clicked,
[=](QAbstractButton* button) { dialogButtonsAction(button); }
);
ui->moduleList->setVisible(false);
const QList<QPushButton*> buttons = ui->buttons->findChildren<QPushButton*>();
for(QPushButton* button : buttons)
button->setAutoDefault(false);
}
void ConfigDialogPrivate::dialogButtonsAction(QAbstractButton* button)
{
Q_Q(ConfigDialog);
QDialogButtonBox::StandardButton standardButton = ui->buttons->standardButton(button);
emit q->clicked(standardButton);
if (standardButton == QDialogButtonBox::Reset)
{
mCache->loadToSettings();
emit q->reset();
}
else if(standardButton == QDialogButtonBox::Close)
{
q->close();
}
}
void ConfigDialogPrivate::updateIcons()
{
Q_Q(ConfigDialog);
for (int ix = 0; ix < mIcons.size(); ix++)
ui->moduleList->item(ix)->setIcon(XdgIcon::fromTheme(mIcons.at(ix)));
q->update();
}
ConfigDialog::ConfigDialog(const QString& title, Settings* settings, QWidget* parent) :
QDialog(parent),
mSettings(settings),
mCache(new SettingsCache(settings)),
ui(new Ui::ConfigDialog)
d_ptr(new ConfigDialogPrivate(this, settings))
{
ui->setupUi(this);
setWindowTitle(title);
connect(ui->buttons, SIGNAL(clicked(QAbstractButton*)), SLOT(dialogButtonsAction(QAbstractButton*)));
ui->moduleList->setVisible(false);
foreach(QPushButton* button, ui->buttons->findChildren<QPushButton*>())
button->setAutoDefault(false);
}
void ConfigDialog::setButtons(QDialogButtonBox::StandardButtons buttons)
{
ui->buttons->setStandardButtons(buttons);
foreach(QPushButton* button, ui->buttons->findChildren<QPushButton*>())
Q_D(ConfigDialog);
d->ui->buttons->setStandardButtons(buttons);
const QList<QPushButton*> b = d->ui->buttons->findChildren<QPushButton*>();
for(QPushButton* button : b)
button->setAutoDefault(false);
}
void ConfigDialog::enableButton(QDialogButtonBox::StandardButton which, bool enable)
{
Q_D(ConfigDialog);
if (QPushButton* pb = d->ui->buttons->button(which))
pb->setEnabled(enable);
}
void ConfigDialog::addPage(QWidget* page, const QString& name, const QString& iconName)
{
addPage(page, name, QStringList() << iconName);
......@@ -58,6 +117,7 @@ void ConfigDialog::addPage(QWidget* page, const QString& name, const QString& ic
void ConfigDialog::addPage(QWidget* page, const QString& name, const QStringList& iconNames)
{
Q_D(ConfigDialog);
Q_ASSERT(page);
if (!page)
{
......@@ -73,40 +133,52 @@ void ConfigDialog::addPage(QWidget* page, const QString& name, const QStringList
page->layout()->setMargin(0);
}
QStringList icons = QStringList(iconNames) << "application-x-executable";
new QListWidgetItem(XdgIcon::fromTheme(icons), name, ui->moduleList);
mIcons.append(icons);
ui->stackedWidget->addWidget(page);
if(ui->stackedWidget->count() > 1)
QStringList icons = QStringList(iconNames) << QL1S("application-x-executable");
new QListWidgetItem(XdgIcon::fromTheme(icons), name, d->ui->moduleList);
d->mIcons.append(icons);
d->ui->stackedWidget->addWidget(page);
d->mPages[name] = page;
if(d->ui->stackedWidget->count() > 1)
{
ui->moduleList->setVisible(true);
ui->moduleList->setCurrentRow(0);
mMaxSize = QSize(qMax(page->geometry().width() + ui->moduleList->geometry().width(),
mMaxSize.width()),
qMax(page->geometry().height() + ui->buttons->geometry().height(),
mMaxSize.height()));
d->ui->moduleList->setVisible(true);
d->ui->moduleList->setCurrentRow(0);
d->mMaxSize = QSize(qMax(page->geometry().width() + d->ui->moduleList->geometry().width(),
d->mMaxSize.width()),
qMax(page->geometry().height() + d->ui->buttons->geometry().height(),
d->mMaxSize.height()));
}
else
{
mMaxSize = page->geometry().size();
d->mMaxSize = page->geometry().size();
}
resize(mMaxSize);
resize(d->mMaxSize);
}
void ConfigDialog::showPage(QWidget* page)
{
int index = ui->stackedWidget->indexOf(page);
Q_D(ConfigDialog);
int index = d->ui->stackedWidget->indexOf(page);
if (index < 0)
return;
ui->stackedWidget->setCurrentIndex(index);
ui->moduleList->setCurrentRow(index);
d->ui->stackedWidget->setCurrentIndex(index);
d->ui->moduleList->setCurrentRow(index);
}
void ConfigDialog::showPage(const QString &name)
{
Q_D(ConfigDialog);
if (d->mPages.contains(name))
showPage(d->mPages.value(name));
else
qWarning("ConfigDialog::showPage: Invalid page name (%s)", name.toLocal8Bit().constData());
}
bool ConfigDialog::event(QEvent * event)
{
Q_D(ConfigDialog);
if (QEvent::ThemeChange == event->type())
updateIcons();
d->updateIcons();
return QDialog::event(event);
}
......@@ -117,30 +189,6 @@ void ConfigDialog::closeEvent(QCloseEvent* event)
mSettings->sync();
}
void ConfigDialog::dialogButtonsAction(QAbstractButton* button)
{
QDialogButtonBox::StandardButton standardButton = ui->buttons->standardButton(button);
emit clicked(standardButton);
if (standardButton == QDialogButtonBox::Reset)
{
mCache->loadToSettings();
emit reset();
}
else if(standardButton == QDialogButtonBox::Close)
{
close();
}
}
void ConfigDialog::updateIcons()
{
for (int ix = 0; ix < mIcons.size(); ix++)
ui->moduleList->item(ix)->setIcon(XdgIcon::fromTheme(mIcons.at(ix)));
update();
}
ConfigDialog::~ConfigDialog()
{
delete ui;
delete mCache;
}
......@@ -2,7 +2,7 @@
* (c)LGPL2+
*
* LXQt - a lightweight, Qt based, desktop toolset
* http://razor-qt.org
* https://lxqt.org
*
* Copyright (C) 2012 Alec Moskvin <alecm@gmx.com>
*
......@@ -25,10 +25,10 @@
#ifndef LXQTCONFIGDIALOG_H
#define LXQTCONFIGDIALOG_H
#include "lxqtsettings.h"
#include <QDialog>
#include <QAbstractButton>
#include <QDialogButtonBox>
#include <QScopedPointer>
#include "lxqtglobals.h"
namespace Ui {
......@@ -37,10 +37,13 @@ class ConfigDialog;
namespace LXQt
{
class Settings;
class ConfigDialogPrivate;
class LXQT_API ConfigDialog : public QDialog
{
Q_OBJECT
Q_DECLARE_PRIVATE(ConfigDialog)
public:
explicit ConfigDialog(const QString& title, Settings* settings, QWidget* parent = 0);
......@@ -52,10 +55,15 @@ public:
*/
void setButtons(QDialogButtonBox::StandardButtons buttons);
/*!
* Enable/disable a standard button if it exists
*/
void enableButton(QDialogButtonBox::StandardButton which, bool enable);
/*!
* Add a page to the configure dialog
*/
void addPage(QWidget* page, const QString& name, const QString& iconName="application-x-executable");
void addPage(QWidget* page, const QString& name, const QString& iconName = QLatin1String("application-x-executable"));
/*!
* Add a page to the configure dialog, attempting several alternative icons to find one in the theme
......@@ -67,7 +75,11 @@ public:
*/
void showPage(QWidget *page);
/*!
* \brief Shows the given page
* \param name The page to be shown.
*/
void showPage(const QString &name);
signals:
/*!
......@@ -93,15 +105,8 @@ protected:
virtual void closeEvent(QCloseEvent* event) override;
private:
SettingsCache* mCache;
QList<QStringList> mIcons;
QSize mMaxSize;
Ui::ConfigDialog* ui;
private slots:
void dialogButtonsAction(QAbstractButton* button);
void updateIcons();
Q_DISABLE_COPY(ConfigDialog)
QScopedPointer<ConfigDialogPrivate> const d_ptr;
};
} // namespace LXQt
......
/*
* LXQt - a lightweight, Qt based, desktop toolset
* https://lxqt.org
*
* Copyright (C) 2012 Alec Moskvin <alecm@gmx.com>
* Copyright (C) 2018 Luís Pereira <luis.artur.pereira@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#ifndef LXQTCONFIGDIALOG_P_H
#define LXQTCONFIGDIALOG_P_H
#include <QHash>
#include <QList>
#include <QSize>
#include <QStringList>
namespace Ui {
class ConfigDialog;
}
class QAbstractButton;
namespace LXQt
{
class ConfigDialog;
class Settings;
class SettingsCache;
class Q_DECL_HIDDEN ConfigDialogPrivate
{
Q_DECLARE_PUBLIC(ConfigDialog)
ConfigDialog* const q_ptr;
public:
ConfigDialogPrivate(ConfigDialog *q, Settings* settings);
~ConfigDialogPrivate();
void init();
void dialogButtonsAction(QAbstractButton* button);
void updateIcons();
SettingsCache* mCache;
QList<QStringList> mIcons;
QSize mMaxSize;
Ui::ConfigDialog* ui;
QHash<QString, QWidget*> mPages;
};
} // namespace LXQt
#endif // LXQTCONFIGDIALOG_P_H
/*
* LXQt - a lightweight, Qt based, desktop toolset
* https://lxqt.org
*
* Copyright (C) 2018 Luís Pereira <luis.artur.pereira@gmail.com>
*
* This program or library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#include "lxqtconfigdialogcmdlineoptions.h"
#include <QCommandLineParser>
namespace LXQt {
class Q_DECL_HIDDEN ConfigDialogCmdLineOptionsPrivate {
public:
QString mPage;
};
ConfigDialogCmdLineOptions::ConfigDialogCmdLineOptions()
: d(new ConfigDialogCmdLineOptionsPrivate)
{
}
ConfigDialogCmdLineOptions::~ConfigDialogCmdLineOptions()
{
}
bool ConfigDialogCmdLineOptions::setCommandLine(QCommandLineParser *parser)
{
Q_ASSERT(parser);
if (!parser)
return false;
return parser->addOption(QCommandLineOption{QStringList{QL1S("s"), QL1S("show-page")}, QCoreApplication::tr("Choose the page to be shown."), QL1S("name")});
}
void ConfigDialogCmdLineOptions::process(QCommandLineParser &parser)
{
if (parser.isSet(QL1S("show-page"))) {
d->mPage = parser.value(QL1S("show-page"));
}
}
QString ConfigDialogCmdLineOptions::page() const
{
return d->mPage;
}
} // LXQt namespace
/*
* LXQt - a lightweight, Qt based, desktop toolset
* https://lxqt.org
*
* Copyright (C) 2018 Luís Pereira <luis.artur.pereira@gmail.com>
*
* This program or library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#ifndef LXQTCONFIGDIALOGCMDLINEOPTIONS_H
#define LXQTCONFIGDIALOGCMDLINEOPTIONS_H
#include "lxqtglobals.h"
#include <QScopedPointer>
#include <QString>
class QCommandLineParser;
namespace LXQt {
class ConfigDialogCmdLineOptionsPrivate;
class LXQT_API ConfigDialogCmdLineOptions
{
public:
ConfigDialogCmdLineOptions();
~ConfigDialogCmdLineOptions();
bool setCommandLine(QCommandLineParser *parser);
void process(QCommandLineParser &parser);
QString page() const;
private:
Q_DISABLE_COPY(ConfigDialogCmdLineOptions)
QScopedPointer<ConfigDialogCmdLineOptionsPrivate> const d;
};
} // LXQt namespace
#endif // LXQTCONFIGDIALOGCMDLINEOPTIONS_H
......@@ -2,7 +2,7 @@
* (c)LGPL2+
*
* LXQt - a lightweight, Qt based, desktop toolset
* http://razor-qt.org
* https://lxqt.org
*
* Copyright: 2010-2011 Razor team
* Authors:
......@@ -61,14 +61,35 @@ PageSelectWidgetItemDelegate::PageSelectWidgetItemDelegate(PageSelectWidget *par
************************************************/
QSize PageSelectWidgetItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
{
QSize size = QStyledItemDelegate::sizeHint(option, index);
QVariant value = index.data(Qt::SizeHintRole);
if (value.isValid())
return qvariant_cast<QSize>(value);
//all items should have unified width
QStyle * style = option.widget ? option.widget->style() : QApplication::style();
//Note: this margin logic follows code in QCommonStylePrivate::viewItemLayout()
QStyleOptionViewItem opt = option;
initStyleOption(&opt, index);
const QWidget *widget = option.widget;
QStyle *style = widget ? widget->style() : QApplication::style();
QSize size = style->sizeFromContents(QStyle::CT_ItemViewItem, &opt, QSize(), widget);
//NOTE: this margin logic follows code in QCommonStylePrivate::viewItemLayout()
const int margin = style->pixelMetric(QStyle::PM_FocusFrameHMargin, &option, option.widget) + 1;
// Find the extra vertical gap by subtracting the height of the text when wrapped within
// the default size from the height of the text when wrapped within our max. width.
const QRect R1 = mView->fontMetrics().boundingRect(QRect(0, 0, size.width() - 2 * margin, 0),
Qt::AlignLeft | Qt::TextWordWrap, opt.text);
const QRect R2 = mView->fontMetrics().boundingRect(QRect(0, 0, mView->getWrappedTextWidth(), 0),
Qt::AlignLeft | Qt::TextWordWrap, opt.text);
// compensate for the vertical gap
size.rheight() -= qAbs(R1.height() - R2.height());
//considering the icon size too
size.setWidth(qMax(mView->maxTextWidth(), option.decorationSize.width()));
// adding the margin is good but not necessary because it is already added
size.rwidth() += 2 * margin;
size.rheight() += margin; // only at the bottom
return size;
}
......@@ -81,6 +102,8 @@ PageSelectWidget::PageSelectWidget(QWidget *parent) :
QListWidget(parent)
, mMaxTextWidth(0)
{
mWrappedTextWidth = fontMetrics().averageCharWidth() * 13; // max. 13 characters
setSelectionRectVisible(false);
setViewMode(IconMode);
setSpacing(2);
......@@ -140,7 +163,8 @@ void PageSelectWidget::updateMaxTextWidth()
{
for(int i = count() - 1; 0 <= i; --i)
{
const QRect r = fontMetrics().boundingRect(QRect{}, Qt::AlignLeft | Qt::TextWordWrap, item(i)->text());
const QRect r = fontMetrics().boundingRect(QRect(0, 0, mWrappedTextWidth, 0),
Qt::AlignLeft | Qt::TextWordWrap, item(i)->text());
mMaxTextWidth = qMax(mMaxTextWidth, r.width());
}
}
......
......@@ -2,7 +2,7 @@
* (c)LGPL2+
*
* LXQt - a lightweight, Qt based, desktop toolset
* http://razor-qt.org
* https://lxqt.org
*
* Copyright: 2010-2011 Razor team
* Authors:
......@@ -44,6 +44,10 @@ public:
int maxTextWidth() const;
bool event(QEvent * event) override;
int getWrappedTextWidth() const {
return mWrappedTextWidth;
}
protected:
QSize viewportSizeHint() const override;
QSize minimumSizeHint() const override;
......@@ -53,6 +57,7 @@ protected slots:
private:
int mMaxTextWidth;
int mWrappedTextWidth;
};
} // namespace LXQt
......
/*.debhelper
/*.log
/*.substvars
/debhelper-build-stamp
/files
/liblxqt0/
/liblxqt0-dev/
/tmp
liblxqt (0.14.1-4) unstable; urgency=medium
* Added kfreebsd as non-linux to rules
* New build dependency dh-exec
* Don't install backlight things for hurd and kfreebsd
* Prepared helper package
-- Alf Gaida <agaida@siduction.org> Sat, 27 Jul 2019 22:59:58 +0200
liblxqt (0.14.1-3) unstable; urgency=medium
* Modified debian/rules for Hurd.
-- Alf Gaida <agaida@siduction.org> Sat, 27 Jul 2019 14:43:27 +0200
liblxqt (0.14.1-2) unstable; urgency=medium
* Applied upstream CMakeLists patches for non-linux.
-- Alf Gaida <agaida@siduction.org> Sat, 27 Jul 2019 14:20:35 +0200
liblxqt (0.14.1-1) unstable; urgency=medium
* Cherry-picking upstream version 0.14.1.
* Bumped minimum version libqt5xdg-dev (>= 3.3.1~)
* Bumped minimum version libqt5xdgiconloader-dev (>= 3.3.1~)
* Added new symbol
-- Alf Gaida <agaida@siduction.org> Sun, 24 Feb 2019 18:01:40 +0100
liblxqt (0.14.0-1) unstable; urgency=medium
* Cherry-picking upstream version 0.14.0.
* Added Build-Depends-Package: liblxqt0-dev to d/liblxqt0-dev.symbols
* Dropped d/compat, use debhelper-compat = 12, no changes needed
* Fixed years in d/copyright
* Bumped minimum version libqt5xdg-dev (>= 3.3.0~)
* Bumped minimum version libqt5xdgiconloader-dev (>= 3.3.0~)
* Bumped minimum version lxqt-build-tools (>= 0.6.0~)
* Removed obsolete PULL_TRANSLATIONS= OFF from dh_auto_configure
* Added l10n-package, moved from lxqt-l10n
* Added d/upstream/metadata
-- Alf Gaida <agaida@siduction.org> Sun, 27 Jan 2019 13:37:40 +0100
liblxqt (0.13.0-1) unstable; urgency=medium
* Cherry-picking upstream version 0.12.0.
* Bumped build dependencies liblqt5xdg* to >= 3.2.0~
* Bumpde build dependency lxqt-build-tools to >= 0.5.0~
* Fixed symbols for the new release
* Added lintian overrides for the helper scripts and configurations
* Removed multiarch=same - packages will not be co-installable anymore
* Moved debian/.gitignore to ./.gitignore
-- Alf Gaida <agaida@siduction.org> Thu, 24 May 2018 18:49:19 +0200
liblxqt (0.12.0-7) unstable; urgency=medium
* Really fix VCS-Git
* Fixed watch file
-- Alf Gaida <agaida@siduction.org> Sun, 29 Apr 2018 23:02:11 +0200
liblxqt (0.12.0-6) unstable; urgency=medium
* Fixed Hompage and Source to lxqt
* Bumped compat to 11
* Bumped debhelper to >= 11~
* Bumped Standards to 4.1.4, no changes needed
* Changed VCS fields for salsa
* Bumped year in copyright
-- Alf Gaida <agaida@siduction.org> Fri, 27 Apr 2018 18:02:45 +0200
liblxqt (0.12.0-5) unstable; urgency=medium
* Bumped Standards to 4.1.2, no changes needed
......
......@@ -5,26 +5,28 @@ Uploaders: Alf Gaida <agaida@siduction.org>,
Andrew Lee (李健秋) <ajqlee@debian.org>
Section: libs
Priority: optional
Build-Depends: debhelper (>= 10),
Build-Depends: debhelper-compat (= 12),
dh-exec,
libpolkit-qt5-1-dev,
libqt5svg5-dev,
libkf5windowsystem-dev,
libqt5x11extras5-dev,
libqt5xdg-dev (>= 3.1.0),
libqt5xdgiconloader-dev (>= 3.1.0),
libqt5xdg-dev (>= 3.3.1~),
libqt5xdgiconloader-dev (>= 3.3.1~),
libx11-dev,
libxss-dev,
lxqt-build-tools (>= 0.4.0)
Standards-Version: 4.1.2
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-lxqt/liblxqt.git
Vcs-Git: https://anonscm.debian.org/git/pkg-lxqt/liblxqt.git
Homepage: https://github.com/lxde/liblxqt
lxqt-build-tools (>= 0.6.0~)
Standards-Version: 4.3.0
Vcs-Browser: https://salsa.debian.org/lxqt-team/liblxqt
Vcs-Git: https://salsa.debian.org/lxqt-team/liblxqt.git
Homepage: https://github.com/lxqt/liblxqt
Package: liblxqt0
Architecture: any
Multi-Arch: same
Depends: ${shlibs:Depends},
${misc:Depends},
desktop-file-utils,
# lxqt-backlight-helper [linux-any],
shared-mime-info
Recommends: liblxqt-l10n
Pre-Depends: ${misc:Pre-Depends}
......@@ -44,7 +46,7 @@ Depends: ${misc:Depends},
liblxqt0 (= ${binary:Version}),
libqt5xdg-dev (>= 3.1.0),
libqt5xdgiconloader-dev (>= 3.1.0),
lxqt-build-tools (>= 0.4.0)
lxqt-build-tools (>= 0.5.0~)
Description: Shared libraries for LXQt desktop environment (dev)
LXQt is an advanced, easy-to-use, and fast desktop environment based on Qt
technologies. It has been tailored for users who value simplicity, speed, and
......@@ -52,3 +54,28 @@ Description: Shared libraries for LXQt desktop environment (dev)
fine with less powerful machines.
.
This package contain the development files.
Package: liblxqt-l10n
Architecture: all
Multi-Arch: foreign
Section: localization
Depends: ${misc:Depends},
qttranslations5-l10n
Breaks: liblxqt0 (<< 0.11.0)
Replaces: liblxqt0 (<< 0.11.0)
Description: Language package for liblxqt
This package contains the l10n files needed by the liblxqt.
# Package: lxqt-backlight-helper
# Architecture: linux-any
# Depends: ${shlibs:Depends},
# ${misc:Depends}
# Description: LXQt backlight helper for linux
# LXQt is an advanced, easy-to-use, and fast desktop environment based on Qt
# technologies. It has been tailored for users who value simplicity, speed, and
# an intuitive interface. Unlike most desktop environments, LXQt also works
# fine with less powerful machines.
# .
# This package contains the backlight helper files needed by the linux LXQt
# desktop environment.
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: liblxqt
Source: https://github.com/lxde/liblxqt
Source: https://github.com/lxqt/liblxqt
Files: *
Copyright: 2012-2017 LXQt team
Copyright: 2012-2019 LXQt team
2010-2012 Razor team
License: LGPL-2.1+
Files: debian/*
Copyright: 2014-2017 Alf Gaida <agaida@siduction.org>
Copyright: 2014-2019 Alf Gaida <agaida@siduction.org>
License: LGPL-2.1+
License: LGPL-2.1+
......
usr/share/lxqt/translations/liblxqt
#!/usr/bin/dh-exec
usr/lib/*/liblxqt.so.*
usr/share/lxqt/power.conf
[linux-any] usr/share/polkit-1/actions/org.lxqt.backlight.pkexec.policy
[linux-any] usr/bin/lxqt-backlight_backend
# lxqt-backlight_backend is a needed helper-application
liblxqt0: application-in-library-section libs usr/bin/lxqt-backlight_backend
# there will be no manpage for lxqt-backlight_backend
liblxqt0: binary-without-manpage usr/bin/lxqt-backlight_backend
liblxqt.so.0 liblxqt0 #MINVER#
* Build-Depends-Package: liblxqt0-dev
(c++)"LXQt::Application::Application(int&, char**)@Base" 0.9.0+20150911
(c++)"LXQt::Application::Application(int&, char**, bool)@Base" 0.9.0+20150911
(c++)"LXQt::Application::listenToUnixSignals(QList<int> const&)@Base" 0.9.0+20150911
......@@ -18,12 +19,25 @@ liblxqt.so.0 liblxqt0 #MINVER#
(c++)"LXQt::AutostartEntry::removeLocal()@Base" 0.9.0+20150911
(c++)"LXQt::AutostartEntry::setEnabled(bool)@Base" 0.9.0+20150911
(c++)"LXQt::AutostartEntry::setFile(XdgDesktopFile const&)@Base" 0.9.0+20150911
(c++)"LXQt::Backlight::Backlight(QObject*)@Base" 0.13.0~
(c++)"LXQt::Backlight::backlightChanged(int)@Base" 0.13.0~
(c++)"LXQt::Backlight::backlightChangedSlot(int)@Base" 0.13.0~
(c++)"LXQt::Backlight::getBacklight()@Base" 0.13.0~
(c++)"LXQt::Backlight::getMaxBacklight()@Base" 0.13.0~
(c++)"LXQt::Backlight::isBacklightAvailable()@Base" 0.13.0~
(c++)"LXQt::Backlight::isBacklightOff()@Base" 0.13.0~
(c++)"LXQt::Backlight::metaObject() const@Base" 0.13.0~
(c++)"LXQt::Backlight::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.13.0~
(c++)"LXQt::Backlight::qt_metacast(char const*)@Base" 0.13.0~
(c++)"LXQt::Backlight::setBacklight(int)@Base" 0.13.0~
(c++)"LXQt::Backlight::staticMetaObject@Base" 0.13.0~
(c++)"LXQt::Backlight::~Backlight()@Base" 0.13.0~
(c++)"LXQt::ConfigDialog::ConfigDialog(QString const&, LXQt::Settings*, QWidget*)@Base" 0.9.0+20150911
(c++)"LXQt::ConfigDialog::addPage(QWidget*, QString const&, QString const&)@Base" 0.9.0+20150911
(c++)"LXQt::ConfigDialog::addPage(QWidget*, QString const&, QStringList const&)@Base" 0.9.0+20150911
(c++)"LXQt::ConfigDialog::clicked(QDialogButtonBox::StandardButton)@Base" 0.9.0+20150911
(c++)"LXQt::ConfigDialog::closeEvent(QCloseEvent*)@Base" 0.9.0+20150911
(c++)"LXQt::ConfigDialog::dialogButtonsAction(QAbstractButton*)@Base" 0.9.0+20150911
(c++)"LXQt::ConfigDialog::enableButton(QDialogButtonBox::StandardButton, bool)@Base" 0.14.1~
(c++)"LXQt::ConfigDialog::event(QEvent*)@Base" 0.11.0
(c++)"LXQt::ConfigDialog::metaObject() const@Base" 0.9.0+20150911
(c++)"LXQt::ConfigDialog::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.9.0+20150911
......@@ -31,10 +45,15 @@ liblxqt.so.0 liblxqt0 #MINVER#
(c++)"LXQt::ConfigDialog::reset()@Base" 0.9.0+20150911
(c++)"LXQt::ConfigDialog::save()@Base" 0.9.0+20150911
(c++)"LXQt::ConfigDialog::setButtons(QFlags<QDialogButtonBox::StandardButton>)@Base" 0.9.0+20150911
(c++)"LXQt::ConfigDialog::showPage(QString const&)@Base" 0.13.0~
(c++)"LXQt::ConfigDialog::showPage(QWidget*)@Base" 0.9.0+20150911
(c++)"LXQt::ConfigDialog::staticMetaObject@Base" 0.9.0+20150911
(c++)"LXQt::ConfigDialog::updateIcons()@Base" 0.9.0+20150911
(c++)"LXQt::ConfigDialog::~ConfigDialog()@Base" 0.9.0+20150911
(c++)"LXQt::ConfigDialogCmdLineOptions::ConfigDialogCmdLineOptions()@Base" 0.13.0~
(c++)"LXQt::ConfigDialogCmdLineOptions::page() const@Base" 0.13.0~
(c++)"LXQt::ConfigDialogCmdLineOptions::process(QCommandLineParser&)@Base" 0.13.0~
(c++)"LXQt::ConfigDialogCmdLineOptions::setCommandLine(QCommandLineParser*)@Base" 0.13.0~
(c++)"LXQt::ConfigDialogCmdLineOptions::~ConfigDialogCmdLineOptions()@Base" 0.13.0~
(c++)"LXQt::GridLayout::GridLayout(QWidget*)@Base" 0.9.0+20150911
(c++)"LXQt::GridLayout::addItem(QLayoutItem*)@Base" 0.9.0+20150911
(c++)"LXQt::GridLayout::animatedMoveInProgress() const@Base" 0.11.0
......@@ -135,6 +154,7 @@ liblxqt.so.0 liblxqt0 #MINVER#
(c++)"LXQt::Power::canAction(LXQt::Power::Action) const@Base" 0.9.0+20150911
(c++)"LXQt::Power::canHibernate() const@Base" 0.9.0+20150911
(c++)"LXQt::Power::canLogout() const@Base" 0.9.0+20150911
(c++)"LXQt::Power::canMonitorOff() const@Base" 0.13.0~
(c++)"LXQt::Power::canReboot() const@Base" 0.9.0+20150911
(c++)"LXQt::Power::canShutdown() const@Base" 0.9.0+20150911
(c++)"LXQt::Power::canSuspend() const@Base" 0.9.0+20150911
......@@ -142,6 +162,7 @@ liblxqt.so.0 liblxqt0 #MINVER#
(c++)"LXQt::Power::hibernate()@Base" 0.9.0+20150911
(c++)"LXQt::Power::logout()@Base" 0.9.0+20150911
(c++)"LXQt::Power::metaObject() const@Base" 0.9.0+20150911
(c++)"LXQt::Power::monitorOff()@Base" 0.13.0~
(c++)"LXQt::Power::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.9.0+20150911
(c++)"LXQt::Power::qt_metacast(char const*)@Base" 0.9.0+20150911
(c++)"LXQt::Power::reboot()@Base" 0.9.0+20150911
......@@ -235,6 +256,17 @@ liblxqt.so.0 liblxqt0 #MINVER#
(c++)"LXQt::Translator::translateLibrary(QString const&)@Base" 0.9.0+20150911
(c++)"LXQt::Translator::translatePlugin(QString const&, QString const&)@Base" 0.9.0+20150911
(c++)"LXQt::Translator::translationSearchPaths()@Base" 0.9.0+20150911
(c++)"LXQt::VirtualBackEnd::VirtualBackEnd(QObject*)@Base" 0.13.0~
(c++)"LXQt::VirtualBackEnd::backlightChanged(int)@Base" 0.13.0~
(c++)"LXQt::VirtualBackEnd::getBacklight()@Base" 0.13.0~
(c++)"LXQt::VirtualBackEnd::getMaxBacklight()@Base" 0.13.0~
(c++)"LXQt::VirtualBackEnd::isBacklightAvailable()@Base" 0.13.0~
(c++)"LXQt::VirtualBackEnd::isBacklightOff()@Base" 0.13.0~
(c++)"LXQt::VirtualBackEnd::metaObject() const@Base" 0.13.0~
(c++)"LXQt::VirtualBackEnd::qt_metacall(QMetaObject::Call, int, void**)@Base" 0.13.0~
(c++)"LXQt::VirtualBackEnd::qt_metacast(char const*)@Base" 0.13.0~
(c++)"LXQt::VirtualBackEnd::setBacklight(int)@Base" 0.13.0~
(c++)"LXQt::VirtualBackEnd::staticMetaObject@Base" 0.13.0~
(c++)"non-virtual thunk to LXQt::ConfigDialog::~ConfigDialog()@Base" 0.9.0+20150911
(c++)"non-virtual thunk to LXQt::GridLayout::invalidate()@Base" 0.9.0+20150911
(c++)"non-virtual thunk to LXQt::GridLayout::setGeometry(QRect const&)@Base" 0.9.0+20150911
......@@ -243,6 +275,7 @@ liblxqt.so.0 liblxqt0 #MINVER#
(c++)"non-virtual thunk to LXQt::PageSelectWidget::~PageSelectWidget()@Base" 0.9.0+20150911
(c++)"typeinfo for LXQt::Application@Base" 0.9.0+20150911
(c++)"typeinfo for LXQt::AutostartEntry@Base" 0.9.0+20150911
(c++)"typeinfo for LXQt::Backlight@Base" 0.13.0~
(c++)"typeinfo for LXQt::ConfigDialog@Base" 0.9.0+20150911
(c++)"typeinfo for LXQt::GridLayout@Base" 0.9.0+20150911
(c++)"typeinfo for LXQt::HtmlDelegate@Base" 0.9.0+20150911
......@@ -257,8 +290,10 @@ liblxqt.so.0 liblxqt0 #MINVER#
(c++)"typeinfo for LXQt::Settings@Base" 0.9.0+20150911
(c++)"typeinfo for LXQt::SettingsCache@Base" 0.9.0+20150911
(c++)"typeinfo for LXQt::SingleApplication@Base" 0.9.0+20150911
(c++)"typeinfo for LXQt::VirtualBackEnd@Base" 0.13.0~
(c++)"typeinfo name for LXQt::Application@Base" 0.9.0+20150911
(c++)"typeinfo name for LXQt::AutostartEntry@Base" 0.9.0+20150911
(c++)"typeinfo name for LXQt::Backlight@Base" 0.13.0~
(c++)"typeinfo name for LXQt::ConfigDialog@Base" 0.9.0+20150911
(c++)"typeinfo name for LXQt::GridLayout@Base" 0.9.0+20150911
(c++)"typeinfo name for LXQt::HtmlDelegate@Base" 0.9.0+20150911
......@@ -273,9 +308,11 @@ liblxqt.so.0 liblxqt0 #MINVER#
(c++)"typeinfo name for LXQt::Settings@Base" 0.9.0+20150911
(c++)"typeinfo name for LXQt::SettingsCache@Base" 0.9.0+20150911
(c++)"typeinfo name for LXQt::SingleApplication@Base" 0.9.0+20150911
(c++)"typeinfo name for LXQt::VirtualBackEnd@Base" 0.13.0~
(c++)"void std::vector<int, std::allocator<int> >::_M_realloc_insert<int>(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int&&)@Base" 0.12.0
(c++)"vtable for LXQt::Application@Base" 0.9.0+20150911
(c++)"vtable for LXQt::AutostartEntry@Base" 0.9.0+20150911
(c++)"vtable for LXQt::Backlight@Base" 0.13.0~
(c++)"vtable for LXQt::ConfigDialog@Base" 0.9.0+20150911
(c++)"vtable for LXQt::GridLayout@Base" 0.9.0+20150911
(c++)"vtable for LXQt::HtmlDelegate@Base" 0.9.0+20150911
......@@ -290,3 +327,4 @@ liblxqt.so.0 liblxqt0 #MINVER#
(c++)"vtable for LXQt::Settings@Base" 0.9.0+20150911
(c++)"vtable for LXQt::SettingsCache@Base" 0.9.0+20150911
(c++)"vtable for LXQt::SingleApplication@Base" 0.9.0+20150911
(c++)"vtable for LXQt::VirtualBackEnd@Base" 0.13.0~
From 0b50e60a67ef51b07edc6fc8d9e9be1075dda12f Mon Sep 17 00:00:00 2001
From: Paul Sonnenschein <paul@sonnenschein.ruhr>
Date: Tue, 23 Jul 2019 18:44:29 +0200
Subject: [PATCH] Fix compilation error on the Hurd.
* This commit disables the Linux backend on the Hurd because it fails to
compile on Debian GNU/Hurd and does not seem to be useful on the Hurd
(the code contains paths which do not exist on Hurd).
.
The build failure was caused by an unconditional use of PATH_MAX, which
is not defined on the Hurd.
* Replace operating system check for the Hurd with an option.
* Do not use Polkit if not compiling the linux backlight backend.
---
CMakeLists.txt | 28 +++++++++++++++++++++++-----
lxqtbacklight.cpp | 8 +++++++-
2 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6a26f19..537de65 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,6 +30,7 @@ set(LXQT_VERSION ${LXQT_MAJOR_VERSION}.${LXQT_MINOR_VERSION}.${LXQT_PATCH_VERSIO
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
+option(BUILD_BACKLIGHT_LINUX_BACKEND "Build the Linux backend for the backlight" ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
@@ -41,7 +42,9 @@ find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED)
find_package(Qt5 ${QT_MINIMUM_VERSION} CONFIG REQUIRED Widgets DBus LinguistTools)
find_package(Qt5Xdg ${QTXDG_MINIMUM_VERSION} REQUIRED)
find_package(KF5WindowSystem ${KF5_MINIMUM_VERSION} REQUIRED)
-find_package(PolkitQt5-1 REQUIRED)
+if (BUILD_BACKLIGHT_LINUX_BACKEND)
+ find_package(PolkitQt5-1 REQUIRED)
+endif (BUILD_BACKLIGHT_LINUX_BACKEND)
if (NOT APPLE)
find_package(Qt5 ${QT_MINIMUM_VERSION} CONFIG REQUIRED X11Extras)
find_package(X11 REQUIRED)
@@ -51,7 +54,10 @@ message(STATUS "Building ${PROJECT_NAME} with Qt ${Qt5Core_VERSION}")
include(CMakePackageConfigHelpers)
include(GNUInstallDirs) # Standard directories for installation
-add_subdirectory(lxqtbacklight/linux_backend/driver)
+if (BUILD_BACKLIGHT_LINUX_BACKEND)
+ add_subdirectory(lxqtbacklight/linux_backend/driver)
+ add_definitions(-DUSE_BACKLIGHT_LINUX_BACKEND)
+endif (BUILD_BACKLIGHT_LINUX_BACKEND)
set(LXQT_PKG_CONFIG_DESCRIPTION "Shared library for LXQt applications")
@@ -136,7 +142,6 @@ set(SRCS
lxqtrotatedwidget.cpp
lxqtbacklight.cpp
lxqtbacklight/virtual_backend.cpp
- lxqtbacklight/linux_backend/linuxbackend.cpp
)
if (NOT APPLE)
@@ -145,6 +150,12 @@ if (NOT APPLE)
)
endif (NOT APPLE)
+if (BUILD_BACKLIGHT_LINUX_BACKEND)
+ list (APPEND SRCS
+ lxqtbacklight/linux_backend/linuxbackend.cpp
+ )
+endif (BUILD_BACKLIGHT_LINUX_BACKEND)
+
set(MOCS
lxqthtmldelegate.h
lxqtpowermanager.h
@@ -163,7 +174,6 @@ set(MOCS
lxqtgridlayout.h
lxqtrotatedwidget.h
lxqtbacklight/virtual_backend.h
- lxqtbacklight/linux_backend/linuxbackend.h
)
if (NOT APPLE)
@@ -172,6 +182,12 @@ if (NOT APPLE)
)
endif (NOT APPLE)
+if (BUILD_BACKLIGHT_LINUX_BACKEND)
+ list (APPEND SRCS
+ lxqtbacklight/linux_backend/linuxbackend.h
+ )
+endif (BUILD_BACKLIGHT_LINUX_BACKEND)
+
set(FORMS
configdialog/lxqtconfigdialog.ui
)
@@ -395,7 +411,9 @@ install(FILES ${LXQT_CONFIG_FILES}
COMPONENT Runtime
)
-install(FILES ${POLKIT_FILES} DESTINATION "${POLKITQT-1_POLICY_FILES_INSTALL_DIR}")
+if (BUILD_BACKLIGHT_LINUX_BACKEND)
+ install(FILES ${POLKIT_FILES} DESTINATION "${POLKITQT-1_POLICY_FILES_INSTALL_DIR}")
+endif (BUILD_BACKLIGHT_LINUX_BACKEND)
#************************************************
# Create and install pkgconfig file
diff --git a/lxqtbacklight.cpp b/lxqtbacklight.cpp
index 581eb9d..c31f219 100644
--- a/lxqtbacklight.cpp
+++ b/lxqtbacklight.cpp
@@ -18,13 +18,19 @@
#include "lxqtbacklight.h"
#include "lxqtbacklight/virtual_backend.h"
-#include "lxqtbacklight/linux_backend/linuxbackend.h"
+#ifdef USE_BACKLIGHT_LINUX_BACKEND
+ #include "lxqtbacklight/linux_backend/linuxbackend.h"
+#endif
namespace LXQt {
Backlight::Backlight(QObject *parent):QObject(parent)
{
+#ifdef USE_BACKLIGHT_LINUX_BACKEND
m_backend = (VirtualBackEnd *) new LinuxBackend(this);
+#else
+ m_backend = new VirtualBackEnd(this);
+#endif
connect(m_backend, &VirtualBackEnd::backlightChanged, this, &Backlight::backlightChangedSlot);
}
From 5bb1354a1e9a6fe35fb2ed09911d3d480f7bbfe9 Mon Sep 17 00:00:00 2001
From: Chih-Hsuan Yen <yan12125@gmail.com>
Date: Sat, 15 Jun 2019 11:14:53 +0800
Subject: [PATCH] Make it build on macOS
* Don't use X11 libs.
* Don't build LXQt::ScreenSaver. It uses the X11 screensaver protocol.
* Use symbols from the KWindowSystem class instead of NET class. The
NETWM header is available on XCB only.
---
CMakeLists.txt | 54 ++++++++++++++++++++++++++++++--------
cmake/lxqt-config.cmake.in | 4 ++-
lxqtsingleapplication.cpp | 3 +--
3 files changed, 47 insertions(+), 14 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30b6d47..6a26f19 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,11 +38,14 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED)
-find_package(Qt5 ${QT_MINIMUM_VERSION} CONFIG REQUIRED Widgets DBus X11Extras LinguistTools)
+find_package(Qt5 ${QT_MINIMUM_VERSION} CONFIG REQUIRED Widgets DBus LinguistTools)
find_package(Qt5Xdg ${QTXDG_MINIMUM_VERSION} REQUIRED)
find_package(KF5WindowSystem ${KF5_MINIMUM_VERSION} REQUIRED)
find_package(PolkitQt5-1 REQUIRED)
-find_package(X11 REQUIRED)
+if (NOT APPLE)
+ find_package(Qt5 ${QT_MINIMUM_VERSION} CONFIG REQUIRED X11Extras)
+ find_package(X11 REQUIRED)
+endif()
message(STATUS "Building ${PROJECT_NAME} with Qt ${Qt5Core_VERSION}")
include(CMakePackageConfigHelpers)
@@ -57,7 +60,6 @@ set(PUB_HDRS
lxqtsettings.h
lxqtplugininfo.h
lxqtpowermanager.h
- lxqtscreensaver.h
lxqtapplication.h
lxqtsingleapplication.h
lxqttranslator.h
@@ -78,12 +80,17 @@ set(PUB_HDRS
#lxqtbacklight/linux_backend/linuxbackend.h
)
+if (NOT APPLE)
+ list (APPEND PUB_HDRS
+ lxqtscreensaver.h
+ )
+endif (NOT APPLE)
+
set(PUBLIC_CLASSES
HtmlDelegate
Settings
PluginInfo
PowerManager
- ScreenSaver
Application
SingleApplication
Translator
@@ -101,13 +108,17 @@ set(PUBLIC_CLASSES
Globals
Backlight
)
+if (NOT APPLE)
+ list (APPEND PUBLIC_CLASSES
+ ScreenSaver
+ )
+endif (NOT APPLE)
set(SRCS
lxqthtmldelegate.cpp
lxqtplugininfo.cpp
lxqtpowermanager.cpp
lxqtsettings.cpp
- lxqtscreensaver.cpp
lxqtapplication.cpp
lxqtsingleapplication.cpp
lxqttranslator.cpp
@@ -128,11 +139,16 @@ set(SRCS
lxqtbacklight/linux_backend/linuxbackend.cpp
)
+if (NOT APPLE)
+ list (APPEND SRCS
+ lxqtscreensaver.cpp
+ )
+endif (NOT APPLE)
+
set(MOCS
lxqthtmldelegate.h
lxqtpowermanager.h
lxqtsettings.h
- lxqtscreensaver.h
lxqtapplication.h
lxqtbacklight.h
@@ -150,6 +166,12 @@ set(MOCS
lxqtbacklight/linux_backend/linuxbackend.h
)
+if (NOT APPLE)
+ list (APPEND MOCS
+ lxqtscreensaver.h
+ )
+endif (NOT APPLE)
+
set(FORMS
configdialog/lxqtconfigdialog.ui
)
@@ -177,7 +199,11 @@ set_property(SOURCE ${DBUS_INTERFACE_SRCS} ${DBUS_ADAPTOR_SRCS} PROPERTY SKIP_AU
list(APPEND SRCS "${DBUS_INTERFACE_SRCS}" "${DBUS_ADAPTOR_SRCS}")
# KF5WindowSystem is missing here. KF5WindowSystem doesn't provide an .pc file.
-set(LXQT_PKG_CONFIG_REQUIRES "Qt5Xdg >= ${QTXDG_MINIMUM_VERSION}, Qt5Widgets >= ${QT_MINIMUM_VERSION}, Qt5Xml >= ${QT_MINIMUM_VERSION}, Qt5DBus >= ${QT_MINIMUM_VERSION}, Qt5X11Extras >= ${QT_MINIMUM_VERSION}")
+set(LXQT_PKG_CONFIG_REQUIRES "Qt5Xdg >= ${QTXDG_MINIMUM_VERSION}, Qt5Widgets >= ${QT_MINIMUM_VERSION}, Qt5Xml >= ${QT_MINIMUM_VERSION}, Qt5DBus >= ${QT_MINIMUM_VERSION}")
+
+if (NOT APPLE)
+ set(LXQT_PKG_CONFIG_REQUIRES "${LXQT_PKG_CONFIG_REQUIRES}, Qt5X11Extras >= ${QT_MINIMUM_VERSION}")
+endif (NOT APPLE)
# Standard directories for installation
@@ -282,13 +308,19 @@ target_link_libraries(${LXQT_LIBRARY_NAME}
KF5::WindowSystem
Qt5::Widgets
Qt5::DBus
- Qt5::X11Extras
Qt5Xdg
- PRIVATE
- ${X11_Xscreensaver_LIB}
- ${X11_X11_LIB}
)
+if (NOT APPLE)
+ target_link_libraries(${LXQT_LIBRARY_NAME}
+ PUBLIC
+ Qt5::X11Extras
+ PRIVATE
+ ${X11_Xscreensaver_LIB}
+ ${X11_X11_LIB}
+ )
+endif (NOT APPLE)
+
set_target_properties(${LXQT_LIBRARY_NAME} PROPERTIES
VERSION ${LXQT_VERSION}
SOVERSION ${LXQT_MAJOR_VERSION}
diff --git a/cmake/lxqt-config.cmake.in b/cmake/lxqt-config.cmake.in
index 5cb6dc5..25eaf61 100644
--- a/cmake/lxqt-config.cmake.in
+++ b/cmake/lxqt-config.cmake.in
@@ -10,11 +10,13 @@ include(CMakeFindDependencyMacro)
find_dependency(Qt5Widgets @QT_MINIMUM_VERSION@)
find_dependency(Qt5DBus @QT_MINIMUM_VERSION@)
-find_dependency(Qt5X11Extras @QT_MINIMUM_VERSION@)
find_dependency(Qt5LinguistTools @QT_MINIMUM_VERSION@)
find_dependency(Qt5Xdg @QTXDG_MINIMUM_VERSION@)
find_dependency(KF5WindowSystem)
find_dependency(lxqt-build-tools @LXQTBT_MINIMUM_VERSION@)
+if (NOT APPLE)
+ find_dependency(Qt5X11Extras @QT_MINIMUM_VERSION@)
+endif (NOT APPLE)
include(LXQtConfigVars)
diff --git a/lxqtsingleapplication.cpp b/lxqtsingleapplication.cpp
index 4ad4b48..508ec3d 100644
--- a/lxqtsingleapplication.cpp
+++ b/lxqtsingleapplication.cpp
@@ -28,7 +28,6 @@
#include "lxqtsingleapplication.h"
#include "singleapplicationadaptor.h"
#include <KWindowSystem/KWindowSystem>
-#include <KWindowSystem/NETWM>
#include <QDBusMessage>
#include <QWidget>
#include <QDebug>
@@ -99,7 +98,7 @@ void SingleApplication::activateWindow()
mActivationWindow->show();