diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-04-12 12:56:20 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-12 14:50:39 +0200 |
commit | 28675642f3445e41434b004c2a1a1d96ec0145a2 (patch) | |
tree | 8a26692b9eba13a416aa16bdc82acc1dc3082e0c /tests/manual/lance/main.cpp | |
parent | 7ed1ab9076866d39a086fb1d364ab1903afc9a91 (diff) |
Build manual tests.
Add a toplevel manual.pro and other .pro-files to build them and
fix the build.
Change-Id: Ibc98a27b39dd1304edfa8a6894d62e77ce7ef387
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'tests/manual/lance/main.cpp')
-rw-r--r-- | tests/manual/lance/main.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/manual/lance/main.cpp b/tests/manual/lance/main.cpp index c33cb49be9..e8bb44a221 100644 --- a/tests/manual/lance/main.cpp +++ b/tests/manual/lance/main.cpp @@ -43,7 +43,8 @@ #include "paintcommands.h" #include <QtCore> -#include <QtGui> +#include <QtWidgets> +#include <QtPrintSupport> #include <qimage.h> #include <QPicture> @@ -612,14 +613,11 @@ int main(int argc, char **argv) pcmd.setType(type); pcmd.setCheckersBackground(checkers_background); pcmd.setContents(content); - bool ps = type == PsType; QPrinter p(highres ? QPrinter::HighResolution : QPrinter::ScreenResolution); QFileInfo input(files.at(j)); - QString file = QString("%1_%2.%3") - .arg(input.baseName()) - .arg(input.suffix()) - .arg(ps ? "ps" : "pdf"); - p.setOutputFormat(ps ? QPrinter::PdfFormat : QPrinter::PostScriptFormat); + const QString file = input.baseName() + QLatin1Char('_') + + input.suffix() + QStringLiteral(".pdf"); + p.setOutputFormat(QPrinter::PdfFormat); p.setOutputFileName(file); p.setPageSize(QPrinter::A4); QPainter pt(&p); |