From 5a47c9280a90fb220ccde9281e56f66d8027ca6e Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 19 Apr 2024 02:09:44 +0300 Subject: [PATCH] kdeplasma-addons: call the base class init() method in applets Signed-off-by: Ivailo Monev --- .../applets/bookmarks/bookmarksplasmoid.cpp | 4 +++- kdeplasma-addons/applets/frame/frame.cpp | 2 ++ kdeplasma-addons/applets/kolourpicker/kolourpicker.cpp | 2 ++ .../applets/konsoleprofiles/konsoleprofiles.cpp | 2 ++ kdeplasma-addons/applets/spellcheck/SpellCheck.cpp | 10 ++++++---- kdeplasma-addons/applets/timer/timer.cpp | 10 ++++++---- 6 files changed, 21 insertions(+), 9 deletions(-) diff --git a/kdeplasma-addons/applets/bookmarks/bookmarksplasmoid.cpp b/kdeplasma-addons/applets/bookmarks/bookmarksplasmoid.cpp index 2be64e7d..335ca327 100644 --- a/kdeplasma-addons/applets/bookmarks/bookmarksplasmoid.cpp +++ b/kdeplasma-addons/applets/bookmarks/bookmarksplasmoid.cpp @@ -35,7 +35,7 @@ #include #include #include -// Qt +// Katie #include #include @@ -58,6 +58,8 @@ BookmarksPlasmoid::BookmarksPlasmoid(QObject* parent, const QVariantList& args) void BookmarksPlasmoid::init() { + Applet::init(); + mBookmarkManager = KBookmarkManager::userBookmarksManager(); mBookmarkManager->setEditorOptions(name(), true); connect(mBookmarkManager, SIGNAL(changed(QString,QString)), SLOT(onBookmarksChanged(QString))); diff --git a/kdeplasma-addons/applets/frame/frame.cpp b/kdeplasma-addons/applets/frame/frame.cpp index e168fed4..4ac0a8e9 100644 --- a/kdeplasma-addons/applets/frame/frame.cpp +++ b/kdeplasma-addons/applets/frame/frame.cpp @@ -118,6 +118,8 @@ Frame::~Frame() void Frame::init() { + Applet::init(); + bool frameReceivedUrlArgs = false; if (!m_currentUrl.isEmpty()) { frameReceivedUrlArgs = true; diff --git a/kdeplasma-addons/applets/kolourpicker/kolourpicker.cpp b/kdeplasma-addons/applets/kolourpicker/kolourpicker.cpp index 00dacbdd..d6b01293 100644 --- a/kdeplasma-addons/applets/kolourpicker/kolourpicker.cpp +++ b/kdeplasma-addons/applets/kolourpicker/kolourpicker.cpp @@ -274,6 +274,8 @@ Kolourpicker::~Kolourpicker() void Kolourpicker::init() { + Plasma::Applet::init(); + configChanged(); } diff --git a/kdeplasma-addons/applets/konsoleprofiles/konsoleprofiles.cpp b/kdeplasma-addons/applets/konsoleprofiles/konsoleprofiles.cpp index bd4eb7f3..1be2141d 100644 --- a/kdeplasma-addons/applets/konsoleprofiles/konsoleprofiles.cpp +++ b/kdeplasma-addons/applets/konsoleprofiles/konsoleprofiles.cpp @@ -187,6 +187,8 @@ KonsoleProfilesApplet::~KonsoleProfilesApplet() void KonsoleProfilesApplet::init() { + Plasma::PopupApplet::init(); + QTimer::singleShot(500, m_konsoleprofileswidget, SLOT(slotUpdateLayout())); } diff --git a/kdeplasma-addons/applets/spellcheck/SpellCheck.cpp b/kdeplasma-addons/applets/spellcheck/SpellCheck.cpp index 250f2ce4..54eb060d 100644 --- a/kdeplasma-addons/applets/spellcheck/SpellCheck.cpp +++ b/kdeplasma-addons/applets/spellcheck/SpellCheck.cpp @@ -42,10 +42,10 @@ K_EXPORT_PLASMA_APPLET(spellcheck, SpellCheck) SpellCheck::SpellCheck(QObject *parent, const QVariantList &args) : Plasma::Applet(parent, args), - m_textEdit(NULL), - m_spellingDialog(NULL), - m_dictionaryComboBox(NULL), - m_dragTimer(0) + m_textEdit(nullptr), + m_spellingDialog(nullptr), + m_dictionaryComboBox(nullptr), + m_dragTimer(0) { KGlobal::locale()->insertCatalog("spellcheck"); setAspectRatioMode(Plasma::ConstrainedSquare); @@ -62,6 +62,8 @@ SpellCheck::~SpellCheck() void SpellCheck::init() { + Plasma::Applet::init(); + Plasma::IconWidget *icon = new Plasma::IconWidget(KIcon("tools-check-spelling"), QString(), this); registerAsDragHandle(icon); diff --git a/kdeplasma-addons/applets/timer/timer.cpp b/kdeplasma-addons/applets/timer/timer.cpp index fbd3b58f..efe6c792 100644 --- a/kdeplasma-addons/applets/timer/timer.cpp +++ b/kdeplasma-addons/applets/timer/timer.cpp @@ -39,10 +39,10 @@ Timer::Timer(QObject *parent, const QVariantList &args) : Plasma::Applet(parent, args), - m_seconds(0), - m_startingSeconds(0), - m_running(false), - m_blinkAnim(0) + m_seconds(0), + m_startingSeconds(0), + m_running(false), + m_blinkAnim(0) { resize(315, 125); setHasConfigurationInterface(true); @@ -56,6 +56,8 @@ Timer::~Timer() void Timer::init() { + Plasma::Applet::init(); + m_svg = new Plasma::Svg(this); m_svg->setImagePath("widgets/timer"); m_svg->setContainsMultipleImages(true);