]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/selectionmode/actionwithwidget.h
port to KIO::createDefaultJobUiDelegate
[dolphin.git] / src / selectionmode / actionwithwidget.h
index 722fdf2843c1352e41c6bd0c8fc0845269e6025f..14db6df2224196d51f4fcaae2af49b47498a44e9 100644 (file)
@@ -1,6 +1,6 @@
 /*
     This file is part of the KDE project
-    SPDX-FileCopyrightText: 2022 Felix Ernst <fe.a.ernst@gmail.com>
+    SPDX-FileCopyrightText: 2022 Felix Ernst <felixernst@zohomail.eu>
 
     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
 */
 
 class QAbstractButton;
 
+namespace SelectionMode
+{
+
 /**
  * @brief Small wrapper/helper class that contains an action and its widget.
  *
  * This class takes neither the responsibility for deleting its action() nor its widget().
+ *
+ * This class is only used from BottomBarContentsContainer currently.
+ * @see BottomBarContentsContainer
  */
 class ActionWithWidget
 {
@@ -25,9 +31,9 @@ public:
     ActionWithWidget(QAction *action);
 
     /**
-     * Connect @p action and @p button using copyActionDataToButton() and the
-     * wraps the two together in the ActionWithWidget object.
-     * ActionWithWidget doesn't take any ownership.
+     * Connect @p action and @p button using copyActionDataToButton() and
+     * wraps the two together in a ActionWithWidget object.
+     * ActionWithWidget doesn't take any ownership over the parameters.
      *
      * @see copyActionDataToButton()
      *
@@ -35,7 +41,7 @@ public:
      */
     ActionWithWidget(QAction *action, QAbstractButton *button);
 
-    /** @returns the action of this object. Crashes if that action has been deleted elsewhere in the meantime. */
+    /** @returns the action of this object. */
     inline QAction *action() {
         Q_CHECK_PTR(m_action);
         return m_action;
@@ -66,7 +72,7 @@ private:
 
 /**
  * A small helper method.
- * @return a button with the correct styling for the general mode of the SelectionModeBottomBar which can be added to its layout.
+ * @return a button with the correct styling for the general mode of the BottomBarContentsContainer which can be added to its layout.
  */
 QAbstractButton *newButtonForAction(QAction *action, QWidget *parent);
 
@@ -83,4 +89,6 @@ QAbstractButton *newButtonForAction(QAction *action, QWidget *parent);
  */
 void copyActionDataToButton(QAbstractButton *button, QAction *action);
 
+}
+
 #endif // ACTIONWITHWIDGET_H