Commit 2e301bd0 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Deprecate standardAction and standardActionUpload methods

parent f41942d8
......@@ -51,7 +51,7 @@ ecm_generate_export_header(KF5NewStuff
VERSION ${KF5_VERSION}
DEPRECATED_BASE_VERSION 0
EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT}
DEPRECATION_VERSIONS 5.29 5.76 5.77
DEPRECATION_VERSIONS 5.29 5.76 5.77 5.78
)
target_include_directories(KF5NewStuff
......
......@@ -13,6 +13,7 @@
using namespace KNS3;
#if KNEWSTUFF_BUILD_DEPRECATED_SINCE(5, 78)
QAction *KNS3::standardAction(const QString &what,
const QObject *receiver,
const char *slot, KActionCollection *parent,
......@@ -25,7 +26,9 @@ QAction *KNS3::standardAction(const QString &what,
return action;
}
#endif
#if KNEWSTUFF_BUILD_DEPRECATED_SINCE(5, 78)
QAction *KNS3::standardActionUpload(const QString &what,
const QObject *receiver,
const char *slot, KActionCollection *parent,
......@@ -33,9 +36,9 @@ QAction *KNS3::standardActionUpload(const QString &what,
{
QAction *action = new QAction(what, parent);
parent->addAction(QLatin1String(name), action);
// FIXME: Get a specific upload icon!
action->setIcon(QIcon::fromTheme(QStringLiteral("get-hot-new-stuff")));
QObject::connect(action, SIGNAL(triggered(bool)), receiver, slot);
return action;
}
#endif
......@@ -19,6 +19,7 @@ class KActionCollection;
*/
namespace KNS3
{
#if KNEWSTUFF_ENABLE_DEPRECATED_SINCE(5, 78)
/**
* @brief Standard action for the Hot New Stuff Download
*
......@@ -32,13 +33,17 @@ namespace KNS3
* @param parent the action's parent collection.
* @param name The name by which the action will be retrieved again from the collection.
* @since 4.4
* @deprecated Since 5.78, create the QAction instance manually.
*/
KNEWSTUFF_DEPRECATED_VERSION(5, 78, "Create the QAction instance manually")
KNEWSTUFF_EXPORT QAction *standardAction(const QString &what,
const QObject *receiver,
const char *slot,
KActionCollection *parent,
const char *name = nullptr);
#endif
#if KNEWSTUFF_ENABLE_DEPRECATED_SINCE(5, 78)
/**
* @brief Standard action for Uploading files with Hot New Stuff
*
......@@ -52,12 +57,15 @@ KNEWSTUFF_EXPORT QAction *standardAction(const QString &what,
* @param parent the action's parent collection.
* @param name The name by which the action will be retrieved again from the collection.
* @since 4.5
* @deprecated Since 5.78, create the QAction instance manually.
*/
KNEWSTUFF_DEPRECATED_VERSION(5, 78, "Create the QAction instance manually")
KNEWSTUFF_EXPORT QAction *standardActionUpload(const QString &what,
const QObject *receiver,
const char *slot,
KActionCollection *parent,
const char *name = nullptr);
#endif
}
#endif // KNEWSTUFFACTION_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment