From c550735ebeb937a36b82c161f0fed4e35b8776bb Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 14 Dec 2016 16:56:12 +0100 Subject: testcon: Show debug log when loading fails Switch to debug log and point it out in message. Change-Id: I0809a1da0c6d5dab148705fae32004af0dc8e371 Reviewed-by: Andy Shaw --- tools/testcon/mainwindow.cpp | 8 +++++--- tools/testcon/mainwindow.ui | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'tools') 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 @@ Raised - + - TabWidget2 + logTabWidget -- cgit v1.2.3