diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-12-14 16:56:12 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-01-19 10:28:42 +0000 |
commit | c550735ebeb937a36b82c161f0fed4e35b8776bb (patch) | |
tree | 05fe9af4549f32e9a8a84c103d4bb5f40a11f56c | |
parent | d14b0f4eebb54c60596750150c5c32f65f67a7df (diff) | |
download | qtactiveqt-c550735ebeb937a36b82c161f0fed4e35b8776bb.tar.gz |
testcon: Show debug log when loading fails
Switch to debug log and point it out in message.
Change-Id: I0809a1da0c6d5dab148705fae32004af0dc8e371
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
-rw-r--r-- | tools/testcon/mainwindow.cpp | 8 | ||||
-rw-r--r-- | tools/testcon/mainwindow.ui | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/tools/testcon/mainwindow.cpp b/tools/testcon/mainwindow.cpp index f116a22..682c8e5 100644 --- a/tools/testcon/mainwindow.cpp +++ b/tools/testcon/mainwindow.cpp @@ -130,9 +130,11 @@ bool MainWindow::addControlFromClsid(const QString &clsid) updateGUI(); } else { delete container; - QMessageBox::information(this, - tr("Error Loading Control"), - tr("The control \"%1\" could not be loaded.").arg(clsid)); + logTabWidget->setCurrentIndex(logTabWidget->count() - 1); + const QString message = + tr("The control \"%1\" could not be loaded." + " See the \"Debug log\" tab for details.").arg(clsid); + QMessageBox::information(this, tr("Error Loading Control"), message); } return result; } diff --git a/tools/testcon/mainwindow.ui b/tools/testcon/mainwindow.ui index 2393c4c..be61cd6 100644 --- a/tools/testcon/mainwindow.ui +++ b/tools/testcon/mainwindow.ui @@ -103,9 +103,9 @@ <enum>Raised</enum> </property> </widget> - <widget class="QTabWidget" name="TabWidget2" > + <widget class="QTabWidget" name="logTabWidget" > <property name="objectName" > - <string notr="true" >TabWidget2</string> + <string notr="true" >logTabWidget</string> </property> <property name="sizePolicy" > <sizepolicy> |