summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets/textdocument-selections/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/doc/snippets/textdocument-selections/mainwindow.cpp')
-rw-r--r--src/gui/doc/snippets/textdocument-selections/mainwindow.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gui/doc/snippets/textdocument-selections/mainwindow.cpp b/src/gui/doc/snippets/textdocument-selections/mainwindow.cpp
index 9253e87670..3e491151bc 100644
--- a/src/gui/doc/snippets/textdocument-selections/mainwindow.cpp
+++ b/src/gui/doc/snippets/textdocument-selections/mainwindow.cpp
@@ -47,11 +47,10 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include "mainwindow.h"
#include <QtWidgets>
-#include "mainwindow.h"
-
MainWindow::MainWindow()
{
QMenu *fileMenu = new QMenu(tr("&File"));
@@ -151,7 +150,6 @@ void MainWindow::pasteSelection()
void MainWindow::selectWord()
{
QTextCursor cursor = editor->textCursor();
- QTextBlock block = cursor.block();
//! [0]
cursor.beginEditBlock();
@@ -168,7 +166,6 @@ void MainWindow::selectWord()
void MainWindow::selectLine()
{
QTextCursor cursor = editor->textCursor();
- QTextBlock block = cursor.block();
cursor.beginEditBlock();
cursor.movePosition(QTextCursor::StartOfLine);
@@ -181,7 +178,6 @@ void MainWindow::selectLine()
void MainWindow::selectBlock()
{
QTextCursor cursor = editor->textCursor();
- QTextBlock block = cursor.block();
cursor.beginEditBlock();
cursor.movePosition(QTextCursor::StartOfBlock);