Change error text for missing platform plugin

Model error text after the default Windows error message for missing
.dll's.

Change-Id: I5328a0fe681ff5104dcf41668d9b08d6a6198c08
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Kai Koehne 2013-06-26 15:44:56 +02:00 committed by The Qt Project
parent a1f9b2b2b0
commit 205d7a184f

View File

@ -787,11 +787,12 @@ static void init_platform(const QString &pluginArgument, const QString &platform
QStringList keys = QPlatformIntegrationFactory::keys(platformPluginPath);
QString fatalMessage
= QStringLiteral("Failed to find or load platform plugin \"%1\".\n").arg(name);
if (!keys.isEmpty())
fatalMessage += QStringLiteral("Available platforms are: %1\n").arg(
= QStringLiteral("This application failed to start because it could not find or load the Qt platform plugin \"%1\".\n\n").arg(name);
if (!keys.isEmpty()) {
fatalMessage += QStringLiteral("Available platform plugins are: %1.\n\n").arg(
keys.join(QStringLiteral(", ")));
fatalMessage += QStringLiteral("GUI applications require a platform plugin. Terminating.");
}
fatalMessage += QStringLiteral("Reinstalling the application may fix this problem.");
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
// Windows: Display message box unless it is a console application
// or debug build showing an assert box.