diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2012-02-23 07:39:45 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-08 09:58:26 +0100 |
commit | a27d5be4dc48e3bd7dbb2a624b17821daa60aaf0 (patch) | |
tree | 7eef648db8198e32e765fc4709025c66c0cd7e0b /examples/touch/fingerpaint/mainwindow.cpp | |
parent | 7de046db735ffc1e17d11dca1bb815876e796cdc (diff) |
examples: compile w/QT_NO_CAST_FROM_BYTEARRAY, at least on Unix
This is all pretty straight-forward, adding .constData() or
using QString::fromLatin1() instead of QLatin1String().
Change-Id: I984706452db7d0841620a0f64e179906123f3849
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'examples/touch/fingerpaint/mainwindow.cpp')
-rw-r--r-- | examples/touch/fingerpaint/mainwindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/touch/fingerpaint/mainwindow.cpp b/examples/touch/fingerpaint/mainwindow.cpp index 288068fa09..be005cf612 100644 --- a/examples/touch/fingerpaint/mainwindow.cpp +++ b/examples/touch/fingerpaint/mainwindow.cpp @@ -206,12 +206,12 @@ bool MainWindow::saveFile(const QByteArray &fileFormat) QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"), initialPath, tr("%1 Files (*.%2);;All Files (*)") - .arg(QString(fileFormat.toUpper())) - .arg(QString(fileFormat))); + .arg(QString::fromLatin1(fileFormat.toUpper())) + .arg(QString::fromLatin1(fileFormat))); if (fileName.isEmpty()) { return false; } else { - return scribbleArea->saveImage(fileName, fileFormat); + return scribbleArea->saveImage(fileName, fileFormat.constData()); } } //! [20] |