Skip to content
Snippets Groups Projects
Commit e2e1532f authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Designer: Reset override cursors while loading forms...

in case Designer shows messages about missing resources or such.
parent d7bf4f51
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,7 @@
#include <QtCore/QDebug>
#include <QtCore/QFileInfo>
#include <QtCore/QFile>
#include <QtGui/QApplication>
namespace Designer {
......@@ -103,7 +104,20 @@ bool FormWindowEditor::createNew(const QString &contents)
if (contents.isEmpty())
return false;
// If we have an override cursor, reset it over Designer loading,
// should it pop up messages about missing resources or such.
const bool hasOverrideCursor = QApplication::overrideCursor();
QCursor overrideCursor;
if (hasOverrideCursor) {
overrideCursor = QCursor(*QApplication::overrideCursor());
QApplication::restoreOverrideCursor();
}
form->setContents(contents);
if (hasOverrideCursor)
QApplication::setOverrideCursor(overrideCursor);
if (form->mainContainer() == 0)
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment