diff options
author | Liang Qi <liang.qi@qt.io> | 2020-01-04 15:32:34 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2020-01-04 15:32:34 +0100 |
commit | a503bf54705d89204007e8f887b668fe5ef519fc (patch) | |
tree | b2d1a452da39450eac78a1aeb1df116a73f64b23 /src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp | |
parent | e65c43fd0ffa57248e7d750570b7deae171a82f5 (diff) | |
parent | 1f87fb359fdff14e42662384a9c8a0bcb3837671 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
src/corelib/tools/qvector.h
Make QVector(DataPointer dd) public to be able to properly merge
5b4b437b30b320e2cd7c9a566999a39772e5d431 from 5.15 into dev.
src/widgets/kernel/qapplication.cpp
tests/auto/tools/moc/allmocs_baseline_in.json
Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
Diffstat (limited to 'src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp')
-rw-r--r-- | src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp b/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp index 0a70c1d32a..5e1f0883e7 100644 --- a/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp +++ b/src/widgets/doc/snippets/code/src_gui_kernel_qapplication.cpp @@ -51,9 +51,10 @@ //! [0] QCoreApplication* createApplication(int &argc, char *argv[]) { - for (int i = 1; i < argc; ++i) + for (int i = 1; i < argc; ++i) { if (!qstrcmp(argv[i], "-no-gui")) return new QCoreApplication(argc, argv); + } return new QApplication(argc, argv); } @@ -187,14 +188,14 @@ for (const QString &command : commands) //! [12] -QWidget *widget = qApp->widgetAt(x, y); +QWidget *widget = QApplication::widgetAt(x, y); if (widget) widget = widget->window(); //! [12] //! [13] -QWidget *widget = qApp->widgetAt(point); +QWidget *widget = QApplication::widgetAt(point); if (widget) widget = widget->window(); //! [13] |