summaryrefslogtreecommitdiff
path: root/examples/activeqt/menus/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/activeqt/menus/main.cpp')
-rw-r--r--examples/activeqt/menus/main.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/examples/activeqt/menus/main.cpp b/examples/activeqt/menus/main.cpp
index 0a4867c..8d70e4d 100644
--- a/examples/activeqt/menus/main.cpp
+++ b/examples/activeqt/menus/main.cpp
@@ -6,7 +6,17 @@
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
@@ -41,6 +51,7 @@
#include "menus.h"
#include <QApplication>
#include <QAxFactory>
+#include <QScopedPointer>
QAXFACTORY_BEGIN(
"{ce947ee3-0403-4fdc-895a-4fe779394b46}", // type library ID
@@ -48,13 +59,13 @@ QAXFACTORY_BEGIN(
QAXCLASS(QMenus)
QAXFACTORY_END()
-int main( int argc, char **argv )
+int main(int argc, char *argv[])
{
- QApplication a( argc, argv );
+ QApplication a(argc, argv);
+ QScopedPointer<QWidget> window;
- QWidget *window = 0;
- if ( !QAxFactory::isServer() ) {
- window = new QMenus();
+ if (!QAxFactory::isServer()) {
+ window.reset(new QMenus());
window->show();
}