Bug 401466 - KMessageBox::detailedError window size is not adjusted to show the error message after I click "Details >>" button
Summary: KMessageBox::detailedError window size is not adjusted to show the error mess...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kwidgetsaddons
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.44.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Christoph Feck
URL:
Keywords:
: 387473 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-11-27 13:24 UTC by Patrick Silva
Modified: 2018-12-19 10:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.54.0
Sentry Crash Report:


Attachments
demonstration (1.46 MB, video/webm)
2018-11-27 13:24 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2018-11-27 13:24:21 UTC
Created attachment 116533 [details]
demonstration

when I click "Details >>" button in an error message, the window size is not adjusted to show the text. The window needs to be resized manually.
Watch the screencast please.

EXPECTED RESULT
the window should show the error message without manual resizing.

SOFTWARE/OS VERSIONS
KDE neon Developer Edition
KDE Plasma: 5.14.80
KDE Frameworks: 5.53.0
Qt: 5.11.2
Comment 1 Carlo Vanini 2018-12-10 14:19:03 UTC
Minimal working example

main.cpp
========

#include <QApplication>
#include <KMessageBox>

int main(int argc, char **argv) {
    QApplication app(argc, argv);

    KMessageBox::detailedError(nullptr,
                               QStringLiteral("This is a short text"),
                               QStringLiteral("Here are the full and long details about the error, or whaterver did happen to the running application.\n")
                              );
    app.processEvents();
    return 0;
}

CMakeLists.txt
==============

cmake_minimum_required(VERSION 2.6)
project(test)
find_package(ECM REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
find_package(Qt5 5.7.0 REQUIRED CONFIG COMPONENTS Widgets)
find_package(KF5 REQUIRED WidgetsAddons)
add_executable(test main.cpp)
target_link_libraries(test KF5::WidgetsAddons)
Comment 2 Christoph Feck 2018-12-10 22:43:30 UTC
https://phabricator.kde.org/D17495
Comment 3 Christoph Feck 2018-12-18 21:54:16 UTC
Git commit 032c783b990e79fa4ec89081cbe814f9df836625 by Christoph Feck.
Committed on 18/12/2018 at 21:50.
Pushed by cfeck into branch 'master'.

[KMessageBox] Fix minimum dialog size when details are requested

QLabel with wordWrap enabled still needs the minimumSize workaround,
which conflicts with the dialog setting its own minimumSize.

Test Plan

.bin/kmessageboxtest 12: When clicking the "Details >>" button, the
dialog window now resizes to show the details.
FIXED-IN: 5.54.0

Reviewed by: ngraham, dhaumann

Differential Revision: https://phabricator.kde.org/D17495

M  +1    -6    src/kmessagebox.cpp

https://commits.kde.org/kwidgetsaddons/032c783b990e79fa4ec89081cbe814f9df836625
Comment 4 Patrick Silva 2018-12-19 10:23:44 UTC
*** Bug 387473 has been marked as a duplicate of this bug. ***