summaryrefslogtreecommitdiffstats
path: root/src/uitools/quiloader.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-05-18 14:39:44 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-05-18 16:55:47 +0200
commit449b8a93170ecc19f2f438b160d0bc4122999401 (patch)
tree0bca27b85e2cd385ee662c614e606efcae594bf3 /src/uitools/quiloader.cpp
parentb9ee8487e944ceab211d7c5b77ba477e8d638933 (diff)
QUiLoader, QAbstractFormBuilder: Introduce errorString().
Introduce errorString() to be able to obtain load errors in Qt Designer. Remove automatic Qt 3 form conversion from Qt Designer (since uic3 no longer exists) and move all form load error checking logic including language check into QAbstractFormBuilder. Make language accessible in FormBuilderExtra in case Jambi is revived. Reviewed-by: hjk
Diffstat (limited to 'src/uitools/quiloader.cpp')
-rw-r--r--src/uitools/quiloader.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/uitools/quiloader.cpp b/src/uitools/quiloader.cpp
index 7f39b557ea..457c7ccd13 100644
--- a/src/uitools/quiloader.cpp
+++ b/src/uitools/quiloader.cpp
@@ -653,7 +653,7 @@ QUiLoader::~QUiLoader()
Loads a form from the given \a device and creates a new widget with the
given \a parentWidget to hold its contents.
- \sa createWidget()
+ \sa createWidget(), errorString()
*/
QWidget *QUiLoader::load(QIODevice *device, QWidget *parentWidget)
{
@@ -936,6 +936,19 @@ bool QUiLoader::isTranslationEnabled() const
return d->builder.trEnabled;
}
+/*!
+ Returns a human-readable description of the last error occurred in load().
+
+ \since 5.0
+ \sa load()
+*/
+
+QString QUiLoader::errorString() const
+{
+ Q_D(const QUiLoader);
+ return d->builder.errorString();
+}
+
QT_END_NAMESPACE
#include "quiloader.moc"