File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 37
37
#include < QEvent>
38
38
#include < QFile>
39
39
#include < QFileInfo>
40
+ #include < QImageReader>
40
41
#include < QInputDialog>
41
42
#include < QKeyEvent>
42
43
#include < QLabel>
62
63
#include < QStringList>
63
64
#include < QTcpSocket>
64
65
#include < QTextStream>
66
+ #include < QtGlobal>
65
67
#include < QTimer>
66
68
#include < QToolButton>
67
69
#include < QVBoxLayout>
68
70
#include < QWhatsThis>
69
- #include < QtGlobal>
70
71
//
71
72
// Mac OS X Includes
72
73
// Must include before GEOS 3 due to unqualified use of 'Point'
@@ -3771,18 +3772,13 @@ void QgisApp::saveMapAsImage()
3771
3772
// get a list of supported output image types
3772
3773
int myCounterInt = 0 ;
3773
3774
QString myFilters;
3774
- QList<QByteArray> formats = QPictureIO::outputFormats ();
3775
- // Workaround for a problem with Qt4 - calls to outputFormats tend
3776
- // to return nothing :(
3777
- if ( formats.count () == 0 )
3778
- {
3779
- formats.append ( " png" );
3780
- formats.append ( " jpg" );
3781
- }
3775
+ QList<QByteArray> formats = QImageReader::supportedImageFormats ();
3782
3776
3783
3777
for ( ; myCounterInt < formats.count (); myCounterInt++ )
3784
3778
{
3785
3779
QString myFormat = QString ( formats.at ( myCounterInt ) );
3780
+ // svg doesnt work so skip it
3781
+ if ( myFormat == " svg" ) continue ;
3786
3782
QString myFilter = createFileFilter_ ( myFormat + " format" , " *." + myFormat );
3787
3783
myFilters += myFilter;
3788
3784
myFilterMap[myFilter] = myFormat;
You can’t perform that action at this time.
0 commit comments