[office/alkimia] src: Fix runtime warning from Qt in widgets

Ralf Habacker <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit a4ed7ae7f07748b4724cdc0041a31c16166df628 by Ralf Habacker.
Committed on 17/08/2026 at 17:29.
Pushed by habacker into branch 'master'.

Fix runtime warning from Qt in widgets

This commit fixes the following runtime warning:

    QLayout: Attempting to add QLayout "" to AlkOnlineQuotesWidget
    "AlkOnlineQuoteDetailsWidget", which already has a layout

CCBUG:523214

M  +14   -5    src/alkonlinequoteswidget.cpp

https://invent.kde.org/office/alkimia/-/commit/a4ed7ae7f07748b4724cdc0041a31c16166df628

diff --git a/src/alkonlinequoteswidget.cpp b/src/alkonlinequoteswidget.cpp
index 7a521b64..774d466a 100644
--- a/src/alkonlinequoteswidget.cpp
+++ b/src/alkonlinequoteswidget.cpp
@@ -165,11 +165,20 @@ AlkOnlineQuotesWidget::Private::Private(bool showProfiles, bool showUpload, AlkO
 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     static KComponentData alk(TRANSLATION_DOMAIN);
 #endif
-    Ui::AlkOnlineQuoteDetailsWidget::setupUi(parent);
-    Ui::AlkOnlineQuotesDebugWidget::setupUi(parent);
-    Ui::AlkOnlineQuotesProfileDetailsWidget::setupUi(parent);
-    Ui::AlkOnlineQuotesProfilesWidget::setupUi(parent);
-    Ui::AlkOnlineQuotesListWidget::setupUi(parent);
+    auto *details = new QWidget(parent);
+    Ui::AlkOnlineQuoteDetailsWidget::setupUi(details);
+
+    auto *debug = new QWidget(parent);
+    Ui::AlkOnlineQuotesDebugWidget::setupUi(debug);
+
+    auto *profileDetails = new QWidget(parent);
+    Ui::AlkOnlineQuotesProfileDetailsWidget::setupUi(profileDetails);
+
+    auto *profiles = new QWidget(parent);
+    Ui::AlkOnlineQuotesProfilesWidget::setupUi(profiles);
+
+    auto *list = new QWidget(parent);
+    Ui::AlkOnlineQuotesListWidget::setupUi(list);
 
     if (!QString(BUILD_KEY).isEmpty())
         m_buildKey->setText(QString("<small>alkimia version: %1</small>").arg(BUILD_KEY));
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.