Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Qt6 port #2024

Merged
merged 34 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5dc5d82
CMake: FindXCB components are upper case
gfgit Feb 11, 2024
07f702a
CMake: update dependencies for Qt6
gfgit Feb 8, 2024
b4fe335
CMake: link to dbusmenu-lxqt instead of dbusmenu-qt6
gfgit Feb 22, 2024
96a6dc6
Replace qAsConst() with std::as_const
gfgit Feb 9, 2024
bfcf78a
Replace QPair with std::pair
gfgit Feb 9, 2024
61893fb
Replace QLatin1Literal with QLatin1String
gfgit Feb 9, 2024
fb5c5c8
QEvent: port pos() to position() and globalPos() to globalPosition()
gfgit Feb 9, 2024
d1c1ce8
Fix QWidget::enterEvent(QEnterEvent*) signature
gfgit Feb 9, 2024
190280c
QLayou::setContentsMargin() instead of setMargin()
gfgit Feb 9, 2024
b8b33c6
QuickLaunchButton: fix ambiguous list initializer
gfgit Feb 9, 2024
df2dbd6
Port QRegExp with QRegularExpression
gfgit Feb 9, 2024
767279e
QLocale territory() instead of country()
gfgit Feb 9, 2024
be4ea20
Qt6 always enables High-DPI Pixmaps
gfgit Feb 9, 2024
ed2ba12
Plugin: move Q_DECLARE_METATYPE()
gfgit Feb 9, 2024
62abb3b
Use QColor::fromString()
gfgit Feb 9, 2024
70b600d
LXQtTaskButton: fix deprecated constructor
gfgit Feb 9, 2024
fd68007
Disable ColorPicker on Wayland
gfgit Feb 9, 2024
4daeae7
Fix KX11Extras, KWindowSystem includes
gfgit Feb 9, 2024
0def137
Port QX11Info to QX11Application
gfgit Feb 9, 2024
182f5c3
LXQtTaskButton: port to KX11Extras
gfgit Feb 11, 2024
5ec5948
LXQtTaskButton: port away from QDesktopWidget
gfgit Feb 11, 2024
6a335eb
QString::arg(...) use mult-arg version
gfgit Feb 11, 2024
ee5f859
LXQtCpuLoad: do not include <QtCore> directly
gfgit Feb 11, 2024
9135e8d
Configuration: fix call to temporary object
gfgit Feb 11, 2024
498c29e
QEyesConfigDialog: avoid allocating temporary container
gfgit Feb 11, 2024
41fa69f
QEyesImageWidget: unneeded QString allocation
gfgit Feb 11, 2024
b818989
LXQtQuickLaunch: fix QSet warning and better readability
gfgit Feb 11, 2024
e16dd22
Port LXQtTrayPlugin to Qt6
gfgit Feb 11, 2024
4349e2c
LXQtTaskBar: fix include recursion
gfgit Feb 11, 2024
c1b37a8
Port LXQtKbIndicatorPlugin to Qt6
gfgit Feb 11, 2024
8b82354
Replace QScopedPointer with std::unique_ptr
gfgit Feb 28, 2024
bc615d9
Replace QVector with QList
gfgit Feb 28, 2024
336f6b2
SNIProxy: use QBitmap::fromImage TODO
gfgit Feb 11, 2024
c7fd57d
README: update mentioned dependencies
gfgit Feb 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,16 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)

set(REQUIRED_QT_VERSION "5.15.0")
set(KF5_MINIMUM_VERSION "5.101.0")
set(LXQT_GLOBALKEYS_MINIMUM_VERSION "1.4.0")
set(LXQT_MINIMUM_VERSION "1.4.0")

find_package(Qt5DBus ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt5LinguistTools ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt5Widgets ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt5X11Extras ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt5Xml ${REQUIRED_QT_VERSION} REQUIRED)
find_package(KF5WindowSystem ${KF5_MINIMUM_VERSION} REQUIRED)
set(REQUIRED_QT_VERSION "6.6.0")
set(KF6_MINIMUM_VERSION "6.0.0")
set(LXQT_GLOBALKEYS_MINIMUM_VERSION "2.0.0")
set(LXQT_MINIMUM_VERSION "2.0.0")

find_package(Qt6DBus ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6LinguistTools ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6Widgets ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6Xml ${REQUIRED_QT_VERSION} REQUIRED)
find_package(KF6WindowSystem ${KF6_MINIMUM_VERSION} REQUIRED)
find_package(lxqt ${LXQT_MINIMUM_VERSION} REQUIRED)
find_package(lxqt-globalkeys-ui ${LXQT_GLOBALKEYS_MINIMUM_VERSION} REQUIRED)
find_package(lxqt-menu-data ${LXQT_MINIMUM_VERSION} REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ As indicated by the name, a volume control. Technically Alsa, OSS and PulseAudio

### Compiling source code

The runtime dependencies are libxcomposite, libdbusmenu-qt5, KGuiAddons, KWindowSystem, Solid, menu-cache, [lxqt-menu-data](https://github.com/lxqt/lxqt-menu-data), [liblxqt](https://github.com/lxqt/liblxqt) and [lxqt-globalkeys](https://github.com/lxqt/lxqt-globalkeys).
The runtime dependencies are libxcomposite, libdbusmenu-lxqt, KGuiAddons, KWindowSystem, Solid, menu-cache, [lxqt-menu-data](https://github.com/lxqt/lxqt-menu-data), [liblxqt](https://github.com/lxqt/liblxqt) and [lxqt-globalkeys](https://github.com/lxqt/lxqt-globalkeys).
Several plugins or features thereof are optional and need additional runtime dependencies. Namely these are (plugin / feature in parenthesis) Alsa library (Alsa support in plugin-volume), PulseAudio client library (PulseAudio support in plugin-volume), lm-sensors (plugin-sensors), libstatgrab (plugin-cpuload, plugin-networkmonitor), [libsysstat](https://github.com/lxqt/libsysstat) (plugin-sysstat). All of them are enabled by default and have to be disabled by CMake variables as required, see below.
In addition CMake and [lxqt-build-tools](https://github.com/lxqt/lxqt-build-tools) are mandatory build dependencies. Git is optionally needed to pull latest VCS checkouts.

Expand Down
8 changes: 4 additions & 4 deletions cmake/BuildPlugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ MACRO (BUILD_LXQT_PLUGIN NAME)
set (PLUGIN_DIR ${CMAKE_INSTALL_FULL_LIBDIR}/${PROGRAM})
endif (NOT DEFINED PLUGIN_DIR)

set(QTX_LIBRARIES Qt5::Widgets)
set(QTX_LIBRARIES Qt6::Widgets)
if(QT_USE_QTXML)
set(QTX_LIBRARIES ${QTX_LIBRARIES} Qt5::Xml)
set(QTX_LIBRARIES ${QTX_LIBRARIES} Qt6::Xml)
endif()
if(QT_USE_QTDBUS)
set(QTX_LIBRARIES ${QTX_LIBRARIES} Qt5::DBus)
set(QTX_LIBRARIES ${QTX_LIBRARIES} Qt6::DBus)
endif()

list(FIND STATIC_PLUGINS ${NAME} IS_STATIC)
Expand All @@ -52,7 +52,7 @@ MACRO (BUILD_LXQT_PLUGIN NAME)
else() # static
add_library(${NAME} STATIC ${SRC}) # build statically linked lib
endif()
target_link_libraries(${NAME} ${QTX_LIBRARIES} lxqt ${LIBRARIES} KF5::WindowSystem)
target_link_libraries(${NAME} ${QTX_LIBRARIES} lxqt ${LIBRARIES} KF6::WindowSystem)

install(FILES ${CONFIG_FILES} DESTINATION ${PLUGIN_SHARE_DIR})
install(FILES ${DESKTOP_FILES} DESTINATION ${PROG_SHARE_DIR})
Expand Down
4 changes: 2 additions & 2 deletions panel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ endif ()

project(${PROJECT})

set(QTX_LIBRARIES Qt5::Widgets Qt5::Xml Qt5::DBus)
set(QTX_LIBRARIES Qt6::Widgets Qt6::Xml Qt6::DBus)

# Translations
lxqt_translate_ts(QM_FILES SOURCES
Expand Down Expand Up @@ -102,7 +102,7 @@ add_executable(${PROJECT}
target_link_libraries(${PROJECT}
${LIBRARIES}
${QTX_LIBRARIES}
KF5::WindowSystem
KF6::WindowSystem
${STATIC_PLUGINS}
)

Expand Down
2 changes: 1 addition & 1 deletion panel/config/configplacement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include "../lxqtpanellimits.h"

#include <KWindowSystem/KWindowSystem>
#include <KWindowSystem>
#include <QDebug>
#include <QListView>
#include <QScreen>
Expand Down
14 changes: 7 additions & 7 deletions panel/config/configpluginswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ ConfigPluginsWidget::ConfigPluginsWidget(LXQtPanel *panel, QWidget* parent) :
{
ui->setupUi(this);

PanelPluginsModel * plugins = mPanel->mPlugins.data();
PanelPluginsModel * plugins = mPanel->mPlugins.get();
{
QScopedPointer<QItemSelectionModel> m(ui->listView_plugins->selectionModel());
std::unique_ptr<QItemSelectionModel> m(ui->listView_plugins->selectionModel());
ui->listView_plugins->setModel(plugins);
}
{
QScopedPointer<QAbstractItemDelegate> d(ui->listView_plugins->itemDelegate());
std::unique_ptr<QAbstractItemDelegate> d(ui->listView_plugins->itemDelegate());
ui->listView_plugins->setItemDelegate(new LXQt::HtmlDelegate(QSize(16, 16), ui->listView_plugins));
}

Expand Down Expand Up @@ -83,11 +83,11 @@ void ConfigPluginsWidget::reset()

void ConfigPluginsWidget::showAddPluginDialog()
{
if (mAddPluginDialog.isNull())
if (!mAddPluginDialog)
{
mAddPluginDialog.reset(new AddPluginDialog);
connect(mAddPluginDialog.data(), &AddPluginDialog::pluginSelected,
mPanel->mPlugins.data(), &PanelPluginsModel::addPlugin);
connect(mAddPluginDialog.get(), &AddPluginDialog::pluginSelected,
mPanel->mPlugins.get(), &PanelPluginsModel::addPlugin);
}
mAddPluginDialog->show();
mAddPluginDialog->raise();
Expand All @@ -96,7 +96,7 @@ void ConfigPluginsWidget::showAddPluginDialog()

void ConfigPluginsWidget::resetButtons()
{
PanelPluginsModel *model = mPanel->mPlugins.data();
PanelPluginsModel *model = mPanel->mPlugins.get();
QItemSelectionModel *selectionModel = ui->listView_plugins->selectionModel();
bool hasSelection = selectionModel->hasSelection();
bool isFirstSelected = selectionModel->isSelected(model->index(0));
Expand Down
2 changes: 1 addition & 1 deletion panel/config/configpluginswidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private slots:

private:
Ui::ConfigPluginsWidget *ui;
QScopedPointer<AddPluginDialog> mAddPluginDialog;
std::unique_ptr<AddPluginDialog> mAddPluginDialog;
LXQtPanel *mPanel;
};

Expand Down
10 changes: 5 additions & 5 deletions panel/config/configstyling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include "../lxqtpanellimits.h"

#include <KWindowSystem/KWindowSystem>
#include <KWindowSystem>
#include <QDebug>
#include <QListView>
#include <QScreen>
Expand Down Expand Up @@ -77,9 +77,9 @@ ConfigStyling::ConfigStyling(LXQtPanel *panel, QWidget *parent) :
************************************************/
void ConfigStyling::reset()
{
mFontColor.setNamedColor(mOldFontColor.name());
mFontColor = QColor::fromString(mOldFontColor.name());
ui->pushButton_customFontColor->setStyleSheet(QStringLiteral("background: %1").arg(mOldFontColor.name()));
mBackgroundColor.setNamedColor(mOldBackgroundColor.name());
mBackgroundColor = QColor::fromString(mOldBackgroundColor.name());
ui->pushButton_customBgColor->setStyleSheet(QStringLiteral("background: %1").arg(mOldBackgroundColor.name()));
ui->lineEdit_customBgImage->setText(mOldBackgroundImage);
ui->slider_opacity->setValue(mOldOpacity);
Expand Down Expand Up @@ -190,7 +190,7 @@ void ConfigStyling::pickFontColor()
d.setWindowModality(Qt::WindowModal);
if (d.exec() && d.currentColor().isValid())
{
mFontColor.setNamedColor(d.currentColor().name());
mFontColor = QColor::fromString(d.currentColor().name());
ui->pushButton_customFontColor->setStyleSheet(QStringLiteral("background: %1").arg(mFontColor.name()));
editChanged();
}
Expand All @@ -206,7 +206,7 @@ void ConfigStyling::pickBackgroundColor()
d.setWindowModality(Qt::WindowModal);
if (d.exec() && d.currentColor().isValid())
{
mBackgroundColor.setNamedColor(d.currentColor().name());
mBackgroundColor = QColor::fromString(d.currentColor().name());
ui->pushButton_customBgColor->setStyleSheet(QStringLiteral("background: %1").arg(mBackgroundColor.name()));
editChanged();
}
Expand Down
22 changes: 11 additions & 11 deletions panel/lxqtpanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@

#include <QScreen>
#include <QWindow>
#include <QX11Info>
#include <QDebug>
#include <QString>
#include <QMenu>
Expand All @@ -49,9 +48,10 @@
#include <XdgIcon>
#include <XdgDirs>

#include <KWindowSystem/KWindowSystem>
#include <KWindowSystem/KX11Extras>
#include <KWindowSystem/NETWM>
#include <KWindowSystem>
#include <KX11Extras>
#include <NETWM>
#include <KWindowInfo>

// Turn on this to show the time required to load each plugin during startup
// #define DEBUG_PLUGIN_LOADTIME
Expand Down Expand Up @@ -221,8 +221,8 @@ LXQtPanel::LXQtPanel(const QString &configGroup, LXQt::Settings *settings, QWidg
connect(LXQt::Settings::globalSettings(), &LXQt::GlobalSettings::settingsChanged, this, [this] { update(); } );
connect(lxqtApp, &LXQt::Application::themeChanged, this, &LXQtPanel::realign);

connect(mStandaloneWindows.data(), &WindowNotifier::firstShown, this, [this] { showPanel(true); });
connect(mStandaloneWindows.data(), &WindowNotifier::lastHidden, this, &LXQtPanel::hidePanel);
connect(mStandaloneWindows.get(), &WindowNotifier::firstShown, this, [this] { showPanel(true); });
connect(mStandaloneWindows.get(), &WindowNotifier::lastHidden, this, &LXQtPanel::hidePanel);

readSettings();

Expand Down Expand Up @@ -446,11 +446,11 @@ void LXQtPanel::loadPlugins()
names_key += QLatin1String(CFG_KEY_PLUGINS);
mPlugins.reset(new PanelPluginsModel(this, names_key, pluginDesktopDirs()));

connect(mPlugins.data(), &PanelPluginsModel::pluginAdded, mLayout, &LXQtPanelLayout::addPlugin);
connect(mPlugins.data(), &PanelPluginsModel::pluginMovedUp, mLayout, &LXQtPanelLayout::moveUpPlugin);
connect(mPlugins.get(), &PanelPluginsModel::pluginAdded, mLayout, &LXQtPanelLayout::addPlugin);
connect(mPlugins.get(), &PanelPluginsModel::pluginMovedUp, mLayout, &LXQtPanelLayout::moveUpPlugin);
//reemit signals
connect(mPlugins.data(), &PanelPluginsModel::pluginAdded, this, &LXQtPanel::pluginAdded);
connect(mPlugins.data(), &PanelPluginsModel::pluginRemoved, this, &LXQtPanel::pluginRemoved);
connect(mPlugins.get(), &PanelPluginsModel::pluginAdded, this, &LXQtPanel::pluginAdded);
connect(mPlugins.get(), &PanelPluginsModel::pluginRemoved, this, &LXQtPanel::pluginRemoved);

const auto plugins = mPlugins->plugins();
for (auto const & plugin : plugins)
Expand Down Expand Up @@ -1127,7 +1127,7 @@ bool LXQtPanel::event(QEvent *event)
// Qt::WA_X11NetWmWindowTypeDock becomes ineffective in Qt 5
// See QTBUG-39887: https://bugreports.qt-project.org/browse/QTBUG-39887
// Let's use KWindowSystem for that
KWindowSystem::setType(effectiveWinId(), NET::Dock);
KX11Extras::setType(effectiveWinId(), NET::Dock);

updateWmStrut(); // reserve screen space for the panel
KX11Extras::setOnAllDesktops(effectiveWinId(), true);
Expand Down
4 changes: 2 additions & 2 deletions panel/lxqtpanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -470,12 +470,12 @@ private slots:
* @brief Pointer to the PanelPluginsModel which will store all the Plugins
* that are loaded.
*/
QScopedPointer<PanelPluginsModel> mPlugins;
std::unique_ptr<PanelPluginsModel> mPlugins;
/**
* @brief object for storing info if some standalone window is shown
* (for preventing hide)
*/
QScopedPointer<WindowNotifier> mStandaloneWindows;
std::unique_ptr<WindowNotifier> mStandaloneWindows;

/**
* @brief Returns the screen index of a screen on which this panel could
Expand Down
10 changes: 5 additions & 5 deletions panel/lxqtpanelapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ LXQtPanelApplicationPrivate::LXQtPanelApplicationPrivate(LXQtPanelApplication *q
ILXQtPanel::Position LXQtPanelApplicationPrivate::computeNewPanelPosition(const LXQtPanel *p, const int screenNum)
{
Q_Q(LXQtPanelApplication);
QVector<bool> screenPositions(4, false); // false means not occupied
QList<bool> screenPositions(4, false); // false means not occupied

for (int i = 0; i < q->mPanels.size(); ++i) {
if (p != q->mPanels.at(i)) {
Expand Down Expand Up @@ -131,7 +131,7 @@ LXQtPanelApplication::LXQtPanelApplication(int& argc, char** argv)
panels << QStringLiteral("panel1");
}

for(const QString& i : qAsConst(panels))
for(const QString& i : std::as_const(panels))
{
addPanel(i);
}
Expand Down Expand Up @@ -199,7 +199,7 @@ void LXQtPanelApplication::reloadPanelsAsNeeded()
for(const QString& name : names)
{
bool found = false;
for(LXQtPanel* panel : qAsConst(mPanels))
for(LXQtPanel* panel : std::as_const(mPanels))
{
if(panel->name() == name)
{
Expand Down Expand Up @@ -246,7 +246,7 @@ void LXQtPanelApplication::screenDestroyed(QObject* screenObj)
QScreen* screen = static_cast<QScreen*>(screenObj);
bool reloadNeeded = false;
qApp->setQuitOnLastWindowClosed(false);
for(LXQtPanel* panel : qAsConst(mPanels))
for(LXQtPanel* panel : std::as_const(mPanels))
{
QWindow* panelWindow = panel->windowHandle();
if(panelWindow && panelWindow->screen() == screen)
Expand Down Expand Up @@ -300,7 +300,7 @@ void LXQtPanelApplication::setIconTheme(const QString &iconTheme)
if (newTheme != QIcon::themeName())
{
QIcon::setThemeName(newTheme);
for(LXQtPanel* panel : qAsConst(mPanels))
for(LXQtPanel* panel : std::as_const(mPanels))
{
panel->update();
panel->updateConfigDialog();
Expand Down
8 changes: 4 additions & 4 deletions panel/lxqtpanellayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class LayoutItemGrid
void moveItem(int from, int to);

private:
QVector<LayoutItemInfo> mInfoItems;
QList<LayoutItemInfo> mInfoItems;
int mColCount;
int mUsedColCount;
int mRowCount;
Expand Down Expand Up @@ -218,7 +218,7 @@ void LayoutItemGrid::rebuild()
{
clear();

for(QLayoutItem *item : qAsConst(mItems))
for(QLayoutItem *item : std::as_const(mItems))
{
doAddToGrid(item);
}
Expand Down Expand Up @@ -648,7 +648,7 @@ void LXQtPanelLayout::setGeometryHoriz(const QRect &geometry)
}

// Calc baselines for plugins like button.
QVector<int> baseLines(qMax(mLeftGrid->colCount(), mRightGrid->colCount()));
QList<int> baseLines(qMax(mLeftGrid->colCount(), mRightGrid->colCount()));
const int bh = geometry.height() / baseLines.count();
const int base_center = bh >> 1;
const int height_remain = 0 < bh ? geometry.height() % baseLines.size() : 0;
Expand Down Expand Up @@ -787,7 +787,7 @@ void LXQtPanelLayout::setGeometryVert(const QRect &geometry)
}

// Calc baselines for plugins like button.
QVector<int> baseLines(qMax(mLeftGrid->colCount(), mRightGrid->colCount()));
QList<int> baseLines(qMax(mLeftGrid->colCount(), mRightGrid->colCount()));
const int bw = geometry.width() / baseLines.count();
const int base_center = bw >> 1;
const int width_remain = 0 < bw ? geometry.width() % baseLines.size() : 0;
Expand Down
1 change: 0 additions & 1 deletion panel/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
int main(int argc, char *argv[])
{
LXQtPanelApplication app(argc, argv);
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);

return app.exec();
}
2 changes: 1 addition & 1 deletion panel/panelpluginsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void PanelPluginsModel::loadPlugins(QStringList const & desktopDirs)
timer.start();
qint64 lastTime = 0;
#endif
for (auto const & name : qAsConst(plugin_names))
for (auto const & name : std::as_const(plugin_names))
{
pluginslist_t::iterator i = mPlugins.insert(mPlugins.end(), {name, nullptr});
QString type = mPanel->settings()->value(name + QStringLiteral("/type")).toString();
Expand Down
6 changes: 2 additions & 4 deletions panel/panelpluginsmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public slots:
*
* \sa mPlugins
*/
typedef QList<QPair <QString/*name*/, QPointer<Plugin> > > pluginslist_t;
typedef QList<std::pair <QString/*name*/, QPointer<Plugin> > > pluginslist_t;

private:
/*!
Expand Down Expand Up @@ -320,7 +320,7 @@ public slots:
* \brief mPlugins Stores all the Plugins.
*
* mPlugins is a QList of elements while each element corresponds to a
* single Plugin. Each element is a QPair of a QString and a QPointer
* single Plugin. Each element is a std::pair of a QString and a QPointer
* while the QPointer points to a Plugin.
*
* To access the elements, you can use indexing or an iterator on the
Expand All @@ -336,6 +336,4 @@ public slots:
LXQtPanel * mPanel;
};

Q_DECLARE_METATYPE(Plugin const *)

#endif // PANELPLUGINSMODEL_H
4 changes: 2 additions & 2 deletions panel/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "pluginsettings_p.h"
#include "lxqtpanel.h"

#include <KWindowSystem/KX11Extras>
#include <KX11Extras>

#include <QDebug>
#include <QProcessEnvironment>
Expand Down Expand Up @@ -127,7 +127,7 @@ Plugin::Plugin(const LXQt::PluginInfo &desktopFile, LXQt::Settings *settings, co
else {
// this plugin is a dynamically loadable module
QString baseName = QStringLiteral("lib%1.so").arg(desktopFile.id());
for(const QString &dirName : qAsConst(dirs))
for(const QString &dirName : std::as_const(dirs))
{
QFileInfo fi(QDir(dirName), baseName);
if (fi.exists())
Expand Down
1 change: 1 addition & 0 deletions panel/plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,6 @@ private slots:

};

Q_DECLARE_METATYPE(Plugin const *)

#endif // PLUGIN_H
Loading
Loading