1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-08 13:18:09 +03:00

require new official Latte library

This commit is contained in:
Michail Vourlakos 2020-04-22 21:10:17 +03:00
parent ac3ccb5b98
commit 6e4779e6ab
32 changed files with 60 additions and 60 deletions

View File

@ -23,7 +23,7 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Activities Archive CoreAddons GuiAddons Crash DBusAddons Declarative GlobalAccel I18n
IconThemes KIO NewStuff Notifications Plasma PlasmaQuick Wayland WindowSystem XmlGui)
find_package(Latte REQUIRED)
find_package(Latte REQUIRED REQUIRED NO_MODULE)
find_package(X11 REQUIRED)
set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"

View File

@ -65,6 +65,7 @@ if(${KF5_VERSION_MINOR} LESS "62")
KF5::ProcessCore
KF5::WaylandClient
KF5::XmlGui
Latte
)
else()
target_link_libraries(latte-dock
@ -89,6 +90,7 @@ else()
KF5::PlasmaQuick
KF5::WaylandClient
KF5::XmlGui
Latte
)
endif()

View File

@ -26,7 +26,7 @@
#include <QWidget>
// Latte
#include <Latte/types.h>
#include <Latte>
class KPluginMetaData;

View File

@ -37,7 +37,7 @@
#include <KAboutApplicationDialog>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace KDeclarative {
class QmlObjectSharedEngine;

View File

@ -30,7 +30,7 @@
#include <Plasma>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Plasma {
class Types;

View File

@ -35,7 +35,7 @@
#include <KActivities/Consumer>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Latte {

View File

@ -33,7 +33,7 @@
#include <Plasma>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Plasma {
class Applet;

View File

@ -40,7 +40,7 @@
#include <KNotification>
// Latte
#include <Latte/types.h>
#include <Latte>
enum SessionType
{

View File

@ -34,7 +34,7 @@
#include <Plasma/Containment>
// Latte
#include <Latte/tasks.h>
#include <Latte>
namespace Latte {
namespace Layouts {
@ -77,13 +77,13 @@ QList<Plasma::Applet *> LaunchersSignals::lattePlasmoids(QString layoutName)
void LaunchersSignals::addLauncher(QString layoutName, int launcherGroup, QString launcher)
{
Tasks::LaunchersGroup group = static_cast<Tasks::LaunchersGroup>(launcherGroup);
Types::LaunchersGroup group = static_cast<Types::LaunchersGroup>(launcherGroup);
if ((Tasks::LaunchersGroup)group == Tasks::UniqueLaunchers) {
if ((Types::LaunchersGroup)group == Types::UniqueLaunchers) {
return;
}
QString lName = (group == Tasks::LayoutLaunchers) ? layoutName : "";
QString lName = (group == Types::LayoutLaunchers) ? layoutName : "";
for(const auto applet : lattePlasmoids(lName)) {
if (QQuickItem *appletInterface = applet->property("_plasma_graphicObject").value<QQuickItem *>()) {
@ -111,13 +111,13 @@ void LaunchersSignals::addLauncher(QString layoutName, int launcherGroup, QStrin
void LaunchersSignals::removeLauncher(QString layoutName, int launcherGroup, QString launcher)
{
Tasks::LaunchersGroup group = static_cast<Tasks::LaunchersGroup>(launcherGroup);
Types::LaunchersGroup group = static_cast<Types::LaunchersGroup>(launcherGroup);
if ((Tasks::LaunchersGroup)group == Tasks::UniqueLaunchers) {
if ((Types::LaunchersGroup)group == Types::UniqueLaunchers) {
return;
}
QString lName = (group == Tasks::LayoutLaunchers) ? layoutName : "";
QString lName = (group == Types::LayoutLaunchers) ? layoutName : "";
for(const auto applet : lattePlasmoids(lName)) {
if (QQuickItem *appletInterface = applet->property("_plasma_graphicObject").value<QQuickItem *>()) {
@ -145,13 +145,13 @@ void LaunchersSignals::removeLauncher(QString layoutName, int launcherGroup, QSt
void LaunchersSignals::addLauncherToActivity(QString layoutName, int launcherGroup, QString launcher, QString activity)
{
Tasks::LaunchersGroup group = static_cast<Tasks::LaunchersGroup>(launcherGroup);
Types::LaunchersGroup group = static_cast<Types::LaunchersGroup>(launcherGroup);
if ((Tasks::LaunchersGroup)group == Tasks::UniqueLaunchers) {
if ((Types::LaunchersGroup)group == Types::UniqueLaunchers) {
return;
}
QString lName = (group == Tasks::LayoutLaunchers) ? layoutName : "";
QString lName = (group == Types::LayoutLaunchers) ? layoutName : "";
for(const auto applet : lattePlasmoids(lName)) {
if (QQuickItem *appletInterface = applet->property("_plasma_graphicObject").value<QQuickItem *>()) {
@ -179,13 +179,13 @@ void LaunchersSignals::addLauncherToActivity(QString layoutName, int launcherGro
void LaunchersSignals::removeLauncherFromActivity(QString layoutName, int launcherGroup, QString launcher, QString activity)
{
Tasks::LaunchersGroup group = static_cast<Tasks::LaunchersGroup>(launcherGroup);
Types::LaunchersGroup group = static_cast<Types::LaunchersGroup>(launcherGroup);
if ((Tasks::LaunchersGroup)group == Tasks::UniqueLaunchers) {
if ((Types::LaunchersGroup)group == Types::UniqueLaunchers) {
return;
}
QString lName = (group == Tasks::LayoutLaunchers) ? layoutName : "";
QString lName = (group == Types::LayoutLaunchers) ? layoutName : "";
for(const auto applet : lattePlasmoids(lName)) {
if (QQuickItem *appletInterface = applet->property("_plasma_graphicObject").value<QQuickItem *>()) {
@ -213,13 +213,13 @@ void LaunchersSignals::removeLauncherFromActivity(QString layoutName, int launch
void LaunchersSignals::urlsDropped(QString layoutName, int launcherGroup, QStringList urls)
{
Tasks::LaunchersGroup group = static_cast<Tasks::LaunchersGroup>(launcherGroup);
Types::LaunchersGroup group = static_cast<Types::LaunchersGroup>(launcherGroup);
if ((Tasks::LaunchersGroup)group == Tasks::UniqueLaunchers) {
if ((Types::LaunchersGroup)group == Types::UniqueLaunchers) {
return;
}
QString lName = (group == Tasks::LayoutLaunchers) ? layoutName : "";
QString lName = (group == Types::LayoutLaunchers) ? layoutName : "";
for(const auto applet : lattePlasmoids(lName)) {
if (QQuickItem *appletInterface = applet->property("_plasma_graphicObject").value<QQuickItem *>()) {
@ -247,13 +247,13 @@ void LaunchersSignals::urlsDropped(QString layoutName, int launcherGroup, QStrin
void LaunchersSignals::moveTask(QString layoutName, uint senderId, int launcherGroup, int from, int to)
{
Tasks::LaunchersGroup group = static_cast<Tasks::LaunchersGroup>(launcherGroup);
Types::LaunchersGroup group = static_cast<Types::LaunchersGroup>(launcherGroup);
if ((Tasks::LaunchersGroup)group == Tasks::UniqueLaunchers) {
if ((Types::LaunchersGroup)group == Types::UniqueLaunchers) {
return;
}
QString lName = (group == Tasks::LayoutLaunchers) ? layoutName : "";
QString lName = (group == Types::LayoutLaunchers) ? layoutName : "";
for(const auto applet : lattePlasmoids(lName)) {
if (applet->id() != senderId) {
@ -283,13 +283,13 @@ void LaunchersSignals::moveTask(QString layoutName, uint senderId, int launcherG
void LaunchersSignals::validateLaunchersOrder(QString layoutName, uint senderId, int launcherGroup, QStringList launchers)
{
Tasks::LaunchersGroup group = static_cast<Tasks::LaunchersGroup>(launcherGroup);
Types::LaunchersGroup group = static_cast<Types::LaunchersGroup>(launcherGroup);
if ((Tasks::LaunchersGroup)group == Tasks::UniqueLaunchers) {
if ((Types::LaunchersGroup)group == Types::UniqueLaunchers) {
return;
}
QString lName = (group == Tasks::LayoutLaunchers) ? layoutName : "";
QString lName = (group == Types::LayoutLaunchers) ? layoutName : "";
for(const auto applet : lattePlasmoids(lName)) {
if (applet->id() != senderId) {

View File

@ -22,11 +22,12 @@
#define PLASMASCREENGEOMETRIES_H
// Qt
#include <QHash>
#include <QObject>
#include <QTimer>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Latte {
class Corona;

View File

@ -35,7 +35,7 @@
#include <QTableView>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Latte {
class Corona;

View File

@ -27,7 +27,7 @@
#include <QStringList>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Latte {
namespace Settings {

View File

@ -22,7 +22,7 @@
#define SETTINGSDATAPREFERENCES_H
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Latte {
namespace Settings {

View File

@ -41,7 +41,7 @@
#include <KHelpMenu>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Ui {
class SettingsDialog;

View File

@ -28,7 +28,7 @@
#include "../../layout/abstractlayout.h"
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Latte {
namespace Settings {

View File

@ -45,7 +45,7 @@
#include <KNewStuff3/KNS3/DownloadDialog>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Latte {
namespace Settings {

View File

@ -28,7 +28,7 @@
#include "../../plasma/extended/theme.h"
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Latte {
namespace Settings {

View File

@ -38,7 +38,7 @@
#include <KSharedConfig>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Latte {
namespace Layouts {

View File

@ -30,7 +30,7 @@
#include <kmodifierkeyinfo.h>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Plasma {
class Containment;

View File

@ -32,7 +32,7 @@
#include <KWindowSystem>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Latte {
namespace ViewPart {

View File

@ -35,7 +35,7 @@
#include <KDeclarative/QmlObjectSharedEngine>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Latte {
namespace ViewPart {

View File

@ -36,7 +36,7 @@
#include <KWindowSystem>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Latte {
namespace ViewPart {

View File

@ -51,9 +51,6 @@
// Plasma
#include <Plasma/Package>
// Latte
#include <Latte/tasks.h>
namespace Latte {
namespace ViewPart {
@ -626,13 +623,13 @@ void PrimaryConfigView::hideConfigWindow()
void PrimaryConfigView::updateLaunchersForGroup(int groupInt)
{
Tasks::LaunchersGroup group = (Tasks::LaunchersGroup)groupInt;
Types::LaunchersGroup group = (Types::LaunchersGroup)groupInt;
//! when the layout/global launchers list is empty then the current dock launchers are used for them
//! as a start point
if (m_corona && m_latteView->layout()) {
if ((group == Tasks::LayoutLaunchers && m_latteView->layout()->launchers().isEmpty())
|| (group == Tasks::GlobalLaunchers && m_corona->universalSettings()->launchers().isEmpty())) {
if ((group == Types::LayoutLaunchers && m_latteView->layout()->launchers().isEmpty())
|| (group == Types::GlobalLaunchers && m_corona->universalSettings()->launchers().isEmpty())) {
Plasma::Containment *c = m_latteView->containment();
@ -667,9 +664,9 @@ void PrimaryConfigView::updateLaunchersForGroup(int groupInt)
QVariant launchers;
if (method.invoke(item, Q_RETURN_ARG(QVariant, launchers))) {
if (group == Tasks::LayoutLaunchers) {
if (group == Types::LayoutLaunchers) {
m_latteView->layout()->setLaunchers(launchers.toStringList());
} else if (group == Tasks::GlobalLaunchers) {
} else if (group == Types::GlobalLaunchers) {
m_corona->universalSettings()->setLaunchers(launchers.toStringList());
}
}

View File

@ -36,7 +36,7 @@
#include <Plasma/FrameSvg>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Plasma {
class Applet;

View File

@ -34,7 +34,7 @@
#include <Plasma/FrameSvg>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Plasma {
class Applet;

View File

@ -47,7 +47,7 @@
#include <QTimer>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Plasma {
class Types;

View File

@ -752,7 +752,7 @@ void VisibilityManager::restoreConfig()
setRaiseOnDesktop(config.readEntry("raiseOnDesktopChange", false));
setRaiseOnActivity(config.readEntry("raiseOnActivityChange", false));
auto storedMode = static_cast<Types::Visibility>(m_latteView->containment()->config().readEntry("visibility", static_cast<int>(Types::DodgeActive)));
auto storedMode = (Types::Visibility)(m_latteView->containment()->config().readEntry("visibility", (int)(Types::DodgeActive)));
if (storedMode == Types::AlwaysVisible) {
qDebug() << "Loading visibility mode: Always Visible , on startup...";
@ -763,7 +763,7 @@ void VisibilityManager::restoreConfig()
return;
}
auto fMode = static_cast<Types::Visibility>(m_latteView->containment()->config().readEntry("visibility", static_cast<int>(Types::DodgeActive)));
Types::Visibility fMode = (Types::Visibility)(m_latteView->containment()->config().readEntry("visibility", (int)(Types::DodgeActive)));
qDebug() << "Loading visibility mode:" << fMode << " on startup...";
setMode(fMode);
});

View File

@ -34,7 +34,7 @@
#include <Plasma/Containment>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Latte {
class Corona;

View File

@ -50,7 +50,7 @@
#include <Plasma>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Latte {
class Corona;

View File

@ -31,7 +31,7 @@
#include <QTimer>
// Latte
#include <Latte/types.h>
#include <Latte>
namespace Latte {
class View;

View File

@ -34,7 +34,7 @@
#include <QRasterWindow>
// Latte
#include <Latte/types.h>
#include <Latte>
// KDE
#include <KWindowSystem>

View File

@ -37,7 +37,7 @@
#include <KIconThemes/KIconLoader>
// Latte
#include <Latte/types.h>
#include <Latte>
// X11
#include <NETWM>