[Uml-devel] KDE/kdesdk/umbrello/umbrello
Ralf Habacker
Ralf.Habacker at freenet.de
Fri Feb 20 12:46:02 UTC 2009
SVN commit 928929 by habacker:
bug fix: removed double entries and sorted list
M +10 -6 umlviewimageexportermodel.cpp
--- trunk/KDE/kdesdk/umbrello/umbrello/umlviewimageexportermodel.cpp #928928:928929
@@ -45,19 +45,23 @@
QStringList UMLViewImageExporterModel::supportedImageTypes()
{
if (!supportedImageTypesList.size()) {
- // specific supported formats
- supportedImageTypesList << "eps";
- supportedImageTypesList << "svg";
-
// QT supported formats
QList<QByteArray> qImageFormats = QImageWriter::supportedImageFormats();
QList<QByteArray>::const_iterator it, it_end;
it = qImageFormats.begin(); it_end = qImageFormats.end();
for (; it != it_end; ++it) {
- supportedImageTypesList << QString(*it).toLower();
+ QString format = QString(*it).toLower();
+ if (!supportedImageTypesList.contains(format))
+ supportedImageTypesList << format;
}
+ // specific supported formats
+ if (!supportedImageTypesList.contains("eps"))
+ supportedImageTypesList << "eps";
+ if (!supportedImageTypesList.contains("svg"))
+ supportedImageTypesList << "svg";
}
-
+ supportedImageTypesList.sort();
+
return supportedImageTypesList;
}
More information about the umbrello-devel
mailing list