summaryrefslogtreecommitdiffstats
path: root/examples/xml/streambookmarks/mainwindow.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-10-31 11:09:00 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-02-17 05:55:19 +0000
commit8d71fae08078afbf4aa2de7429302f46d46fb43f (patch)
treedd67e91f7dc00c38582930a774981865c6d8d850 /examples/xml/streambookmarks/mainwindow.h
parent146f6d261ba743b643825d62cdb2deb1e701d3d2 (diff)
Polish the XML bookmarks examples
- Use Qt 5 connect syntax. - Streamline code, remove unused members. - Add a context menu for copying and opening the URLs. - Add const to XML code. - In the XML code, show the use of QStringLiteral in static inline functions to create strings versus QLatin1String in comparison overloads to avoid allocating strings from const char * literals. Change-Id: Ib5e62ca188e271ffe01996dff3c9ea8e0b60739a Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'examples/xml/streambookmarks/mainwindow.h')
-rw-r--r--examples/xml/streambookmarks/mainwindow.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/examples/xml/streambookmarks/mainwindow.h b/examples/xml/streambookmarks/mainwindow.h
index 2b6feeb26f..fbdc1e0c62 100644
--- a/examples/xml/streambookmarks/mainwindow.h
+++ b/examples/xml/streambookmarks/mainwindow.h
@@ -69,20 +69,13 @@ public slots:
void open();
void saveAs();
void about();
-
+#if !defined(QT_NO_CONTEXTMENU) && !defined(QT_NO_CLIPBOARD)
+ void onCustomContextMenuRequested(const QPoint &pos);
+#endif
private:
- void createActions();
void createMenus();
QTreeWidget *treeWidget;
-
- QMenu *fileMenu;
- QMenu *helpMenu;
- QAction *openAct;
- QAction *saveAsAct;
- QAction *exitAct;
- QAction *aboutAct;
- QAction *aboutQtAct;
};
//! [0]