blob: 86eb56bb788b4fe50959a477d68cf75c443b174a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
--- ./pmpovraywidget.cpp.orig 2009-08-31 15:13:57.000000000 +0000
+++ ./pmpovraywidget.cpp 2012-08-08 22:00:05.311318130 +0000
@@ -237,12 +237,6 @@
QFile* file = 0;
bool ok = true;
- if( !s_imageFormatsRegistered )
- {
-
- s_imageFormatsRegistered = true;
- }
-
KUrl url = KFileDialog::getSaveUrl( KUrl( ), KImageIO::pattern( KImageIO::Writing ) );
if( url.isEmpty( ) )
return;
@@ -255,17 +249,7 @@
return;
}
-#ifdef __GNUC__
-#warning is this really needed?
-#endif
- QString suffix = url.fileName().toUpper();
- if (suffix.lastIndexOf('.') >= 0)
- suffix = suffix.mid(suffix.lastIndexOf('.'));
-
- QString format;
-
- if (QImageWriter::supportedImageFormats().contains(suffix.toLatin1()))
- format = suffix;
+ QString format = url.fileName().section('.', -1);
if( format.isEmpty( ) )
{
@@ -274,12 +258,6 @@
return;
}
- if( !KImageIO::types( ).contains(format) )
- {
- KMessageBox::error( this, i18n( "Format is not supported for writing." ) );
- return;
- }
-
if( url.isLocalFile( ) )
{
// Local file
|