Skip to content

Commit 6d3eec0

Browse files
author
telwertowski
committed
Call setCodec("UTF-8") when reading UTF-8 text; it is not the default for Macs. Also change Qt deprecated Q_OS_MACX to Q_WS_MAC.
git-svn-id: http://svn.osgeo.org/qgis/trunk@7753 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 7b40c2b commit 6d3eec0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/app/qgsabout.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include "qgsabout.h"
2020
#include "qgsapplication.h"
21-
#ifdef Q_OS_MACX
21+
#ifdef Q_WS_MAC
2222
#include <ApplicationServices/ApplicationServices.h>
2323
#else
2424
#include <QInputDialog>
@@ -60,6 +60,9 @@ void QgsAbout::init()
6060
#endif
6161
if ( file.open( QIODevice::ReadOnly ) ) {
6262
QTextStream stream( &file );
63+
#ifdef Q_OS_DARWIN
64+
stream.setCodec("UTF-8");
65+
#endif
6366
QString line;
6467
#ifdef QGISDEBUG
6568
int i = 1;
@@ -219,7 +222,7 @@ void QgsAbout::on_btnQgisHome_clicked()
219222

220223
void QgsAbout::openUrl(QString url)
221224
{
222-
#ifdef Q_OS_MACX
225+
#ifdef Q_WS_MAC
223226
/* Use Mac OS X Launch Services which uses the user's default browser
224227
* and will just open a new window if that browser is already running.
225228
* QProcess creates a new browser process for each invocation and expects a

0 commit comments

Comments
 (0)