Changeset 11394 in osm


Ignore:
Timestamp:
2008-10-22T12:56:56+02:00 (16 years ago)
Author:
stoecker
Message:

windows fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wmsplugin/webkit-image.cpp

    r11173 r11394  
    99#include <QtCore/QDebug>
    1010#include <QtWebKit/QWebView>
     11
     12/* using mingw to set binary mode */
     13#ifdef WIN32
     14#include <io.h>
     15#include <fcntl.h>
     16#define BINARYSTDOUT setmode(fileno(stdout), O_BINARY);
     17#else
     18#define BINARYSTDOUT
     19#endif
    1120
    1221#define WIDTH 2000
     
    5463      QPixmap p = QPixmap::grabWidget(view, 0,0,xsize,ysize);
    5564      QFile f;
    56       if(f.open(stdout,QIODevice::WriteOnly|QIODevice::Unbuffered))
     65      BINARYSTDOUT
     66      if(f.open(stdout, QIODevice::WriteOnly|QIODevice::Unbuffered))
    5767        p.save(&f, "PNG");
    5868    }
Note: See TracChangeset for help on using the changeset viewer.