[Uml-devel] KDE/kdesdk/umbrello/umbrello/codeimpwizard
Ralf Habacker
ralf.habacker at gmail.com
Tue Jan 10 14:34:45 UTC 2012
SVN commit 1272959 by habacker:
Give visual feedback on failed imports.
M +13 -3 codeimpthread.cpp
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimpwizard/codeimpthread.cpp #1272958:1272959
@@ -52,17 +52,27 @@
{
ClassImport *classImporter = ClassImport::createImporterByFileExt(m_file.fileName(), this);
QString fileName = m_file.absoluteFilePath();
+
if (classImporter) {
emit messageToLog(m_file.fileName(), "start import...");
emit messageToWiz(m_file.fileName(), "started");
emit messageToApp(i18n("Importing file: %1", fileName));
- classImporter->importFile(fileName);
- delete classImporter;
+ // FIXME: ClassImport still uses umldoc->writeToStatusBar for log writing
+
+ if (!classImporter->importFile(fileName)) {
+ emit messageToApp(i18nc("show failed on status bar", "Failed."));
+ emit messageToWiz(m_file.fileName(), "failed");
+ emit messageToLog(m_file.fileName(), "...import failed");
+ emit aborted();
+ }
+ else {
emit messageToApp(i18nc("show Ready on status bar", "Ready."));
emit messageToWiz(m_file.fileName(), "finished");
- emit messageToLog(m_file.fileName(), "...stop import");
+ emit messageToLog(m_file.fileName(), "...import finished");
emit finished();
}
+ delete classImporter;
+ }
else {
emit messageToWiz(m_file.fileName(), "aborted");
emit messageToApp(i18n("No code importer for file: %1", fileName));
More information about the umbrello-devel
mailing list