mirror of
https://github.com/KDE/latte-dock.git
synced 2025-02-22 13:57:44 +03:00
fix warnings
This commit is contained in:
parent
13cecfa348
commit
2db252b769
@ -445,10 +445,10 @@ QList<Plasma::Types::Location> CentralLayout::freeEdges(int screen) const
|
||||
return edges;
|
||||
}
|
||||
|
||||
Types::ViewType CentralLayout::latteViewType(int containmentId) const
|
||||
Types::ViewType CentralLayout::latteViewType(uint containmentId) const
|
||||
{
|
||||
for (const auto view : m_latteViews) {
|
||||
if (view->containment() && view->containment()->id() == containmentId) {
|
||||
if (view->containment() && view->containment()->id() == (uint)containmentId) {
|
||||
return view->type();
|
||||
}
|
||||
}
|
||||
|
@ -71,12 +71,12 @@ public:
|
||||
void setSharedLayout(SharedLayout *layout);
|
||||
|
||||
//! OVERRIDE GeneralLayout implementations
|
||||
void addView(Plasma::Containment *containment, bool forceOnPrimary = false, int explicitScreen = -1, Layout::ViewsMap *occupied = nullptr);
|
||||
void addView(Plasma::Containment *containment, bool forceOnPrimary = false, int explicitScreen = -1, Layout::ViewsMap *occupied = nullptr) override;
|
||||
void syncLatteViewsToScreens(Layout::ViewsMap *occupiedMap = nullptr) override;
|
||||
void unloadContainments() override;
|
||||
bool configViewIsShown() const override;
|
||||
const QStringList appliedActivities() override;
|
||||
Types::ViewType latteViewType(int containmentId) const override;
|
||||
Types::ViewType latteViewType(uint containmentId) const override;
|
||||
QList<Latte::View *> latteViews() override;
|
||||
|
||||
int viewsCount(int screen) const override;
|
||||
|
@ -323,7 +323,7 @@ Latte::Corona *GenericLayout::corona()
|
||||
return m_corona;
|
||||
}
|
||||
|
||||
Types::ViewType GenericLayout::latteViewType(int containmentId) const
|
||||
Types::ViewType GenericLayout::latteViewType(uint containmentId) const
|
||||
{
|
||||
for (const auto view : m_latteViews) {
|
||||
if (view->containment() && view->containment()->id() == containmentId) {
|
||||
@ -580,7 +580,7 @@ QList<Latte::View *> GenericLayout::viewsWithPlasmaShortcuts()
|
||||
return views;
|
||||
}
|
||||
|
||||
QList<int> appletsWithShortcuts = m_corona->globalShortcuts()->shortcutsTracker()->appletsWithPlasmaShortcuts();
|
||||
QList<uint> appletsWithShortcuts = m_corona->globalShortcuts()->shortcutsTracker()->appletsWithPlasmaShortcuts();
|
||||
|
||||
for (const auto &appletId : appletsWithShortcuts) {
|
||||
for (const auto view : m_latteViews) {
|
||||
|
@ -99,7 +99,7 @@ public:
|
||||
|
||||
QStringList unloadedContainmentsIds();
|
||||
|
||||
virtual Types::ViewType latteViewType(int containmentId) const;
|
||||
virtual Types::ViewType latteViewType(uint containmentId) const;
|
||||
const QList<Plasma::Containment *> *containments();
|
||||
|
||||
Latte::View *highestPriorityView();
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
SharedLayout(CentralLayout *assigned, QObject *parent, QString layoutFile, QString layoutName = QString());
|
||||
~SharedLayout() override;
|
||||
|
||||
const QStringList appliedActivities();
|
||||
const QStringList appliedActivities() override;
|
||||
CentralLayout *currentCentralLayout() const;
|
||||
|
||||
//! OVERRIDE GeneralLayout implementations
|
||||
|
@ -204,7 +204,7 @@ void Storage::copyView(Plasma::Containment *containment)
|
||||
//!investigate if there multiple systray(s) in the containment to copy also
|
||||
|
||||
//! systrayId, systrayAppletId
|
||||
QHash<int, QString> systraysInfo;
|
||||
QHash<uint, QString> systraysInfo;
|
||||
auto applets = containment->config().group("Applets");
|
||||
|
||||
for (const auto &applet : applets.groupList()) {
|
||||
|
@ -475,7 +475,7 @@ Importer::LatteFileVersion Importer::fileVersion(QString file)
|
||||
version2LatteDir = true;
|
||||
}
|
||||
|
||||
if (version1applets && version1applets) {
|
||||
if (version1applets) {
|
||||
return ConfigVersion1;
|
||||
} else if (version2rc && version2LatteDir) {
|
||||
return ConfigVersion2;
|
||||
|
@ -242,7 +242,7 @@ void LaunchersSignals::urlsDropped(QString layoutName, int launcherGroup, QStrin
|
||||
}
|
||||
}
|
||||
|
||||
void LaunchersSignals::moveTask(QString layoutName, int senderId, int launcherGroup, int from, int to)
|
||||
void LaunchersSignals::moveTask(QString layoutName, uint senderId, int launcherGroup, int from, int to)
|
||||
{
|
||||
Types::LaunchersGroup group = static_cast<Types::LaunchersGroup>(launcherGroup);
|
||||
|
||||
@ -278,7 +278,7 @@ void LaunchersSignals::moveTask(QString layoutName, int senderId, int launcherGr
|
||||
}
|
||||
}
|
||||
|
||||
void LaunchersSignals::validateLaunchersOrder(QString layoutName, int senderId, int launcherGroup, QStringList launchers)
|
||||
void LaunchersSignals::validateLaunchersOrder(QString layoutName, uint senderId, int launcherGroup, QStringList launchers)
|
||||
{
|
||||
Types::LaunchersGroup group = static_cast<Types::LaunchersGroup>(launcherGroup);
|
||||
|
||||
|
@ -61,8 +61,8 @@ public slots:
|
||||
Q_INVOKABLE void removeLauncherFromActivity(QString layoutName, int launcherGroup, QString launcher, QString activity);
|
||||
Q_INVOKABLE void urlsDropped(QString layoutName, int launcherGroup, QStringList urls);
|
||||
//!Deprecated because it could create crashes, validateLaunchersOrder provides a better approach
|
||||
Q_INVOKABLE void moveTask(QString layoutName, int senderId, int launcherGroup, int from, int to);
|
||||
Q_INVOKABLE void validateLaunchersOrder(QString layoutName, int senderId, int launcherGroup, QStringList launchers);
|
||||
Q_INVOKABLE void moveTask(QString layoutName, uint senderId, int launcherGroup, int from, int to);
|
||||
Q_INVOKABLE void validateLaunchersOrder(QString layoutName, uint senderId, int launcherGroup, QStringList launchers);
|
||||
|
||||
private:
|
||||
QList<Plasma::Applet *> lattePlasmoids(QString layoutName);
|
||||
|
@ -71,8 +71,7 @@ QWidget *Activities::createEditor(QWidget *parent, const QStyleOptionViewItem &o
|
||||
QStringList allActivities = index.data(Model::Layouts::ALLACTIVITIESROLE).toStringList();
|
||||
QStringList assignedActivities = index.data(Qt::UserRole).toStringList();
|
||||
|
||||
for (unsigned int i = 0; i < allActivities.count(); ++i) {
|
||||
|
||||
for (int i = 0; i < allActivities.count(); ++i) {
|
||||
if (allActivities[i] == Model::Layouts::FREEACTIVITIESID) {
|
||||
bool isFreeActivitiesChecked = assignedActivities.contains(Model::Layouts::FREEACTIVITIESID);
|
||||
|
||||
|
@ -85,7 +85,7 @@ void ShortcutsTracker::shortcutsFileChanged(const QString &file)
|
||||
parseGlobalShortcuts();
|
||||
}
|
||||
|
||||
QList<int> ShortcutsTracker::appletsWithPlasmaShortcuts()
|
||||
QList<uint> ShortcutsTracker::appletsWithPlasmaShortcuts()
|
||||
{
|
||||
return m_appletShortcuts.keys();
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
|
||||
QStringList badgesForActivate() const;
|
||||
|
||||
QList<int> appletsWithPlasmaShortcuts();
|
||||
QList<uint> appletsWithPlasmaShortcuts();
|
||||
|
||||
public slots:
|
||||
Q_INVOKABLE QString appletShortcutBadge(int appletId);
|
||||
@ -69,7 +69,7 @@ private:
|
||||
|
||||
//! shortcuts assigned to applets through plasma infrastructure
|
||||
//! <applet id, shortcut>
|
||||
QHash<int, QString> m_appletShortcuts;
|
||||
QHash<uint, QString> m_appletShortcuts;
|
||||
|
||||
KSharedConfig::Ptr m_shortcutsConfigPtr;
|
||||
};
|
||||
|
@ -87,7 +87,7 @@ bool ContainmentInterface::applicationLauncherHasGlobalShortcut() const
|
||||
return false;
|
||||
}
|
||||
|
||||
int launcherAppletId = applicationLauncherId();
|
||||
uint launcherAppletId = applicationLauncherId();
|
||||
|
||||
const auto applets = m_view->containment()->applets();
|
||||
|
||||
@ -106,7 +106,7 @@ bool ContainmentInterface::applicationLauncherInPopup() const
|
||||
return false;
|
||||
}
|
||||
|
||||
int launcherAppletId = applicationLauncherId();
|
||||
uint launcherAppletId = applicationLauncherId();
|
||||
QString launcherPluginId;
|
||||
|
||||
const auto applets = m_view->containment()->applets();
|
||||
|
@ -1378,7 +1378,7 @@ bool View::appletIsExpandable(const int id)
|
||||
}
|
||||
|
||||
for (const auto applet : containment()->applets()) {
|
||||
if (applet->id() == id) {
|
||||
if (applet->id() == (uint)id) {
|
||||
PlasmaQuick::AppletQuickItem *ai = applet->property("_plasma_graphicObject").value<PlasmaQuick::AppletQuickItem *>();
|
||||
|
||||
if (ai) {
|
||||
@ -1397,7 +1397,7 @@ bool View::appletIsExpanded(const int id)
|
||||
}
|
||||
|
||||
for (const auto applet : containment()->applets()) {
|
||||
if (applet->id() == id) {
|
||||
if (applet->id() == (uint)id) {
|
||||
PlasmaQuick::AppletQuickItem *ai = applet->property("_plasma_graphicObject").value<PlasmaQuick::AppletQuickItem *>();
|
||||
|
||||
if (ai) {
|
||||
@ -1416,7 +1416,7 @@ void View::toggleAppletExpanded(const int id)
|
||||
}
|
||||
|
||||
for (const auto applet : containment()->applets()) {
|
||||
if (applet->id() == id) {
|
||||
if (applet->id() == (uint)id) {
|
||||
PlasmaQuick::AppletQuickItem *ai = applet->property("_plasma_graphicObject").value<PlasmaQuick::AppletQuickItem *>();
|
||||
|
||||
if (ai) {
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
bool windowCanBeDragged(WindowId wid) const override;
|
||||
bool windowCanBeMaximized(WindowId wid) const override;
|
||||
|
||||
QIcon iconFor(WindowId wid) const;
|
||||
QIcon iconFor(WindowId wid) const override;
|
||||
WindowId winIdFor(QString appId, QRect geometry) const override;
|
||||
WindowId winIdFor(QString appId, QString title) const override;
|
||||
|
||||
|
@ -93,10 +93,6 @@ void XWindowInterface::setViewExtraFlags(QObject *view,bool isPanelWindow, Latte
|
||||
}
|
||||
}
|
||||
|
||||
if (winId < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
NETWinInfo winfo(QX11Info::connection()
|
||||
, static_cast<xcb_window_t>(winId)
|
||||
, static_cast<xcb_window_t>(winId)
|
||||
|
Loading…
x
Reference in New Issue
Block a user