summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/picturetransfer
diff options
context:
space:
mode:
authorAndre de la Rocha <andre.rocha@qt.io>2019-06-06 13:55:29 +0200
committerAndre de la Rocha <andre.rocha@qt.io>2019-06-06 13:55:29 +0200
commitbbd5a988592e31b5f8ec0a111e7fea30c222f0ec (patch)
treee0d88cc8f106f46a24489a7b8fee19f627898146 /examples/bluetooth/picturetransfer
parent6ee559eefc3fee286eb92a5f5d8b8fe004d0dc42 (diff)
Update Bluetooth examples for high-DPI displays and nullptr
This change sets the Qt::AA_EnableHighDpiScaling application attribute. It also uses nullptr to initialize pointers and adds a trivial optimization to the low energy scanner example. Change-Id: Ia923573ad78108a2a6a72be4c0948ea97a7ec094 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'examples/bluetooth/picturetransfer')
-rw-r--r--examples/bluetooth/picturetransfer/filetransfer.h2
-rw-r--r--examples/bluetooth/picturetransfer/main.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/examples/bluetooth/picturetransfer/filetransfer.h b/examples/bluetooth/picturetransfer/filetransfer.h
index 5e2e08f9..4dee32fe 100644
--- a/examples/bluetooth/picturetransfer/filetransfer.h
+++ b/examples/bluetooth/picturetransfer/filetransfer.h
@@ -59,7 +59,7 @@ class FileTransfer : public QObject
Q_OBJECT
Q_PROPERTY(float progress READ getProgress NOTIFY progressChanged)
public:
- explicit FileTransfer(QObject *parent = 0);
+ explicit FileTransfer(QObject *parent = nullptr);
float getProgress() { return m_progress;}
signals:
diff --git a/examples/bluetooth/picturetransfer/main.cpp b/examples/bluetooth/picturetransfer/main.cpp
index b4a1e670..4622e87e 100644
--- a/examples/bluetooth/picturetransfer/main.cpp
+++ b/examples/bluetooth/picturetransfer/main.cpp
@@ -58,6 +58,7 @@
int main(int argc, char *argv[])
{
+ QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication application(argc, argv);
//! [Transfer-2]
QQuickView view;