diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-05-18 08:25:39 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-05-18 16:01:51 +0200 |
commit | 18aad6da87a329ddf7ca7c92bf2371628220fb4f (patch) | |
tree | e0f5ac631150ff4c90fda808a0af482a4ab298ff /examples/widgets/richtext/textedit/textedit.h | |
parent | 21607d5db5e03a2784d588b21c59c70f7ad5cdc8 (diff) |
Brush up the text edit example
- Use initializer lists
- Use u instead of QLatin1String()
- Fix some clang warnings about else after return, constFirst()
- Streamline code
- Remove slot TextEdit::printPreview() which is not needed
- Rename variable fileName to pdfFileName in filePrintPdf()
to disambiguate from this->fileName
Pick-to: 6.1
Change-Id: I377ebfd13487470b6f8eaf568dd5d99354f761f2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'examples/widgets/richtext/textedit/textedit.h')
-rw-r--r-- | examples/widgets/richtext/textedit/textedit.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/widgets/richtext/textedit/textedit.h b/examples/widgets/richtext/textedit/textedit.h index debc401150..6b95891d31 100644 --- a/examples/widgets/richtext/textedit/textedit.h +++ b/examples/widgets/richtext/textedit/textedit.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the demonstration applications of the Qt Toolkit. @@ -52,8 +52,6 @@ #define TEXTEDIT_H #include <QMainWindow> -#include <QMap> -#include <QPointer> QT_BEGIN_NAMESPACE class QAction; @@ -106,7 +104,6 @@ private slots: void clipboardDataChanged(); void about(); - void printPreview(QPrinter *); private: void setupFileActions(); @@ -146,7 +143,6 @@ private: QFontComboBox *comboFont; QComboBox *comboSize; - QToolBar *tb; QString fileName; QTextEdit *textEdit; }; |