OSDN Git Service

plasma: mark Plasma::Corona::appletMimeType() as const
authorIvailo Monev <xakepa10@gmail.com>
Wed, 30 Aug 2023 21:41:42 +0000 (00:41 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Wed, 30 Aug 2023 21:41:57 +0000 (00:41 +0300)
could batch such changes but - meh..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
plasma/containment.h
plasma/containmentactions.h
plasma/corona.cpp
plasma/corona.h

index 4a60365..e5866a2 100644 (file)
@@ -22,9 +22,9 @@
 #ifndef PLASMA_CONTAINMENT_H
 #define PLASMA_CONTAINMENT_H
 
-#include <QtGui/QGraphicsItem>
-#include <QtGui/QWidget>
-#include <QtGui/qstyleoption.h>
+#include <QGraphicsItem>
+#include <QWidget>
+#include <QStyleOptionGraphicsItem>
 
 #include <kplugininfo.h>
 #include <ksharedconfig.h>
index 8501ad4..97de6b9 100644 (file)
@@ -21,6 +21,7 @@
 #define PLASMA_CONTAINMENTACTIONS_H
 
 #include <QList>
+#include <QAction>
 
 #include <kplugininfo.h>
 #include <kdeversion.h>
@@ -28,8 +29,6 @@
 #include <plasma/plasma.h>
 #include <plasma/packagestructure.h>
 
-#include <QAction>
-
 namespace Plasma
 {
 
index 01fbb3a..d80cc55 100644 (file)
@@ -85,7 +85,7 @@ void Corona::setAppletMimeType(const QString &type)
     d->mimetype = type;
 }
 
-QString Corona::appletMimeType()
+QString Corona::appletMimeType() const
 {
     return d->mimetype;
 }
index 0764c63..2c62d73 100644 (file)
@@ -51,7 +51,7 @@ class PLASMA_EXPORT Corona : public QGraphicsScene
 //typedef QHash<QString, QList<Plasma::Applet*> > layouts;
 
 public:
-    explicit Corona(QObject * parent = 0);
+    explicit Corona(QObject *parent = nullptr);
     ~Corona();
 
     /**
@@ -63,7 +63,7 @@ public:
     /**
      * The current mime type of Drag/Drop items.
      */
-    QString appletMimeType();
+    QString appletMimeType() const;
 
     /**
      * @return the default containment plugin type
@@ -195,13 +195,13 @@ public:
 
     /**
      * @since 4.4
-    * Recommended position for a popup window like a menu or a tooltip
-    * given its size
-    * @param item the item that the popup should appear adjacent to (an applet, say)
-    * @param size size of the popup
-    * @param alignment alignment of the popup, valid flags are Qt::AlignLeft, Qt::AlignRight and Qt::AlignCenter
-    * @returns reccomended position
-    */
+     * Recommended position for a popup window like a menu or a tooltip
+     * given its size
+     * @param item the item that the popup should appear adjacent to (an applet, say)
+     * @param size size of the popup
+     * @param alignment alignment of the popup, valid flags are Qt::AlignLeft, Qt::AlignRight and Qt::AlignCenter
+     * @returns reccomended position
+     */
     QPoint popupPosition(const QGraphicsItem *item, const QSize &size, Qt::AlignmentFlag alignment = Qt::AlignLeft);
 
     /**