summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc
diff options
context:
space:
mode:
authorAxel Waggershauser <awagger@gmail.com>2013-03-15 00:42:15 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-16 20:22:50 +0100
commitb11317a64339f5a4bcffc8234ecaf15c7fb416f2 (patch)
treef81e40ee49f5109b4100048d131d5bb922b448aa /src/widgets/doc
parent72367a94a750355eb748793ce8c365373a332c9c (diff)
Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src/widgets/doc')
-rw-r--r--src/widgets/doc/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp2
-rw-r--r--src/widgets/doc/snippets/customviewstyle.cpp2
-rw-r--r--src/widgets/doc/snippets/javastyle.cpp20
-rw-r--r--src/widgets/doc/snippets/layouts/layouts.cpp6
-rw-r--r--src/widgets/doc/snippets/mainwindowsnippet.cpp8
-rw-r--r--src/widgets/doc/snippets/mdiareasnippets.cpp2
-rw-r--r--src/widgets/doc/snippets/myscrollarea.cpp2
-rw-r--r--src/widgets/doc/snippets/qtablewidget-using/mainwindow.cpp2
-rw-r--r--src/widgets/doc/snippets/simplemodel-use/main.cpp2
-rw-r--r--src/widgets/doc/snippets/stringlistmodel/model.cpp4
-rw-r--r--src/widgets/doc/snippets/timeline/main.cpp8
-rw-r--r--src/widgets/doc/src/model-view-programming.qdoc2
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/focus.qdoc6
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/layout.qdoc14
-rw-r--r--src/widgets/doc/src/windows-and-dialogs/dialogs.qdoc4
-rw-r--r--src/widgets/doc/src/windows-and-dialogs/mainwindow.qdoc2
16 files changed, 43 insertions, 43 deletions
diff --git a/src/widgets/doc/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp b/src/widgets/doc/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp
index b5d9708f99..0b6ae83ffb 100644
--- a/src/widgets/doc/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp
+++ b/src/widgets/doc/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp
@@ -57,7 +57,7 @@ mapper->addMapping(ageSpinBox, 1);
//! [2]
-QDataWidgetMapper *mapper = new QDataWidgetMapper();
+QDataWidgetMapper *mapper = new QDataWidgetMapper();
connect(myTableView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
mapper, SLOT(setCurrentModelIndex(QModelIndex)));
//! [2]
diff --git a/src/widgets/doc/snippets/customviewstyle.cpp b/src/widgets/doc/snippets/customviewstyle.cpp
index 6bb022574d..cdb4ed1d77 100644
--- a/src/widgets/doc/snippets/customviewstyle.cpp
+++ b/src/widgets/doc/snippets/customviewstyle.cpp
@@ -61,7 +61,7 @@ void CustomViewStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
painter->restore();
break;
- }
+ }
default:
QProxyStyle::drawPrimitive(element, option, painter, widget);
}
diff --git a/src/widgets/doc/snippets/javastyle.cpp b/src/widgets/doc/snippets/javastyle.cpp
index 15cc53ce2d..37f02c7f13 100644
--- a/src/widgets/doc/snippets/javastyle.cpp
+++ b/src/widgets/doc/snippets/javastyle.cpp
@@ -103,7 +103,7 @@ QPalette JavaStyle::standardPalette() const
palette.setBrush(QPalette::Inactive, QPalette::Highlight, QColor(184, 207, 229));
palette.setBrush(QPalette::Inactive, QPalette::HighlightedText, Qt::black);
-
+
palette.setBrush(QPalette::Disabled, QPalette::Button,
QColor(238, 238, 238));
palette.setBrush(QPalette::Disabled, QPalette::WindowText,
@@ -968,7 +968,7 @@ void JavaStyle::drawControl(ControlElement control, const QStyleOption *option,
painter->setBrush(QColor(200, 221, 242));
painter->drawPath(outerPath);
painter->setPen(QColor(200, 221, 242));
- painter->drawRect(QRect(bottomLeft + adjustTabPoint(
+ painter->drawRect(QRect(bottomLeft + adjustTabPoint(
QPoint(2, -3), tab->shape),
bottomRight + adjustTabPoint(
QPoint(-2, 0), tab->shape)));
@@ -976,7 +976,7 @@ void JavaStyle::drawControl(ControlElement control, const QStyleOption *option,
painter->setBrush(Qt::NoBrush);
painter->drawPath(whitePath);
- if (option->state & State_HasFocus) {
+ if (option->state & State_HasFocus) {
painter->setPen(option->palette.color(QPalette::Mid));
painter->drawPath(innerPath);
}
@@ -1699,7 +1699,7 @@ void JavaStyle::drawComplexControl(ComplexControl control,
menuOption.rect = menuRect;
QStyleOptionToolButton label = *button;
- int fw = 5;
+ int fw = 5;
drawControl(CE_ToolButtonLabel, &label, painter, widget);
if (button->subControls & SC_ToolButtonMenu) {
@@ -1713,7 +1713,7 @@ void JavaStyle::drawComplexControl(ComplexControl control,
drawPrimitive(PE_FrameFocusRect, &focusOption, painter, widget);
}
-
+
break;
}
case CC_ComboBox: {
@@ -2113,7 +2113,7 @@ void JavaStyle::drawPrimitive(PrimitiveElement element,
painter->drawLine(center, QPoint(center.x(),
option->rect.bottom()));
}
-
+
if (option->state & State_Children)
if (option->state & State_Open)
painter->drawPixmap(pixmapRect.topLeft(), closedPixmap);
@@ -2198,7 +2198,7 @@ void JavaStyle::drawPrimitive(PrimitiveElement element,
painter->drawPoint(center.x() + 1 + add, center.y() + 1 + add);
break;
}
- case PE_FrameDockWidget: {
+ case PE_FrameDockWidget: {
drawPrimitive(PE_FrameWindow, option, painter, widget);
break;
}
@@ -2226,7 +2226,7 @@ void JavaStyle::drawPrimitive(PrimitiveElement element,
painter->drawPoint(offset + xySwitch(QPoint(add + 8, i),
horizontal));
}
-
+
break;
}
case PE_IndicatorToolBarSeparator: {
@@ -2591,7 +2591,7 @@ int JavaStyle::styleHint(StyleHint hint, const QStyleOption *option,
break;
}
case QStyle::SH_Menu_Scrollable:
- ret = 1;
+ ret = 1;
break;
default:
ret = QCommonStyle::styleHint(hint, option, widget, returnData);
@@ -2719,7 +2719,7 @@ QSize JavaStyle::sizeFromContents(ContentsType type,
int height = 0;
if (!menuItem->icon.isNull()) {
- width += 20;
+ width += 20;
height += 20;
}
if (!menuItem->text.isEmpty()) {
diff --git a/src/widgets/doc/snippets/layouts/layouts.cpp b/src/widgets/doc/snippets/layouts/layouts.cpp
index c41f370070..9ec2349615 100644
--- a/src/widgets/doc/snippets/layouts/layouts.cpp
+++ b/src/widgets/doc/snippets/layouts/layouts.cpp
@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
window->show();
//! [5]
}
-
+
{
//! [6]
QWidget *window = new QWidget;
@@ -101,7 +101,7 @@ int main(int argc, char *argv[])
window->show();
//! [11]
}
-
+
{
//! [12]
QWidget *window = new QWidget;
@@ -158,7 +158,7 @@ int main(int argc, char *argv[])
window->setWindowTitle("QFormLayout");
//! [23]
window->show();
-//! [23]
+//! [23]
}
{
diff --git a/src/widgets/doc/snippets/mainwindowsnippet.cpp b/src/widgets/doc/snippets/mainwindowsnippet.cpp
index 1ba58ca0e7..a9a9012d46 100644
--- a/src/widgets/doc/snippets/mainwindowsnippet.cpp
+++ b/src/widgets/doc/snippets/mainwindowsnippet.cpp
@@ -55,10 +55,10 @@ void MainWindow::createMenus()
//setMenuWidget(new QPushButton("Hello"));
QMenu *menu = new QMenu("File");
menu->addAction("Save &As");
-
+
QMenuBar *bar = new QMenuBar;
bar->addMenu(menu);
-
+
setMenuWidget(new QWidget());
}
@@ -84,9 +84,9 @@ void MainWindow::createDockWidgets()
//! [0]
QDockWidget *dockWidget = new QDockWidget(tr("Dock Widget"), this);
- dockWidget->setAllowedAreas(Qt::LeftDockWidgetArea |
+ dockWidget->setAllowedAreas(Qt::LeftDockWidgetArea |
Qt::RightDockWidgetArea);
dockWidget->setWidget(dockWidgetContents);
- addDockWidget(Qt::LeftDockWidgetArea, dockWidget);
+ addDockWidget(Qt::LeftDockWidgetArea, dockWidget);
//! [0]
}
diff --git a/src/widgets/doc/snippets/mdiareasnippets.cpp b/src/widgets/doc/snippets/mdiareasnippets.cpp
index 51555f8984..42902b4cd7 100644
--- a/src/widgets/doc/snippets/mdiareasnippets.cpp
+++ b/src/widgets/doc/snippets/mdiareasnippets.cpp
@@ -57,7 +57,7 @@ void addingSubWindowsExample()
{
QWidget *internalWidget1 = new QWidget;
QWidget *internalWidget2 = new QWidget;
-
+
//! [1]
QMdiArea mdiArea;
QMdiSubWindow *subWindow1 = new QMdiSubWindow;
diff --git a/src/widgets/doc/snippets/myscrollarea.cpp b/src/widgets/doc/snippets/myscrollarea.cpp
index 48434952c3..675acf89ef 100644
--- a/src/widgets/doc/snippets/myscrollarea.cpp
+++ b/src/widgets/doc/snippets/myscrollarea.cpp
@@ -121,7 +121,7 @@ int main(int argv, char **args)
MyScrollArea area(&label);
area.resize(300, 300);
area.show();
-
+
area.setWidget(&label);
return app.exec();
diff --git a/src/widgets/doc/snippets/qtablewidget-using/mainwindow.cpp b/src/widgets/doc/snippets/qtablewidget-using/mainwindow.cpp
index d9f9853d9c..85b5baf56e 100644
--- a/src/widgets/doc/snippets/qtablewidget-using/mainwindow.cpp
+++ b/src/widgets/doc/snippets/qtablewidget-using/mainwindow.cpp
@@ -117,7 +117,7 @@ void MainWindow::averageItems()
foreach (item, selected) {
bool ok;
double value = item->text().toDouble(&ok);
-
+
if (ok && !item->text().isEmpty()) {
total += value;
number++;
diff --git a/src/widgets/doc/snippets/simplemodel-use/main.cpp b/src/widgets/doc/snippets/simplemodel-use/main.cpp
index ed435f9897..d291a02b6b 100644
--- a/src/widgets/doc/snippets/simplemodel-use/main.cpp
+++ b/src/widgets/doc/snippets/simplemodel-use/main.cpp
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
title->setBackgroundRole(QPalette::Base);
title->setMargin(8);
layout->addWidget(title);
-
+
//! [0]
QFileSystemModel *model = new QFileSystemModel;
QModelIndex parentIndex = model->index(QDir::currentPath());
diff --git a/src/widgets/doc/snippets/stringlistmodel/model.cpp b/src/widgets/doc/snippets/stringlistmodel/model.cpp
index 3bf91ec326..b1fa2abdf0 100644
--- a/src/widgets/doc/snippets/stringlistmodel/model.cpp
+++ b/src/widgets/doc/snippets/stringlistmodel/model.cpp
@@ -60,7 +60,7 @@ int StringListModel::rowCount(const QModelIndex &parent) const
#ifdef 0
-// This represents a read-only version of data(), an early stage in the
+// This represents a read-only version of data(), an early stage in the
// development of the example leading to an editable StringListModel.
/*!
@@ -103,7 +103,7 @@ QVariant StringListModel::data(const QModelIndex &index, int role) const
if (index.row() >= stringList.size())
return QVariant();
-
+
if (role == Qt::DisplayRole || role == Qt::EditRole)
return stringList.at(index.row());
else
diff --git a/src/widgets/doc/snippets/timeline/main.cpp b/src/widgets/doc/snippets/timeline/main.cpp
index eb2e8a2c70..9e4d218a88 100644
--- a/src/widgets/doc/snippets/timeline/main.cpp
+++ b/src/widgets/doc/snippets/timeline/main.cpp
@@ -47,17 +47,17 @@ int main(int argv, char *args[])
//! [0]
QGraphicsItem *ball = new QGraphicsEllipseItem(0, 0, 20, 20);
-
+
QTimeLine *timer = new QTimeLine(5000);
timer->setFrameRange(0, 100);
-
+
QGraphicsItemAnimation *animation = new QGraphicsItemAnimation;
animation->setItem(ball);
animation->setTimeLine(timer);
- for (int i = 0; i < 200; ++i)
+ for (int i = 0; i < 200; ++i)
animation->setPosAt(i / 200.0, QPointF(i, i));
-
+
QGraphicsScene *scene = new QGraphicsScene();
scene->setSceneRect(0, 0, 250, 250);
scene->addItem(ball);
diff --git a/src/widgets/doc/src/model-view-programming.qdoc b/src/widgets/doc/src/model-view-programming.qdoc
index a1c6a29066..6bcd0943a1 100644
--- a/src/widgets/doc/src/model-view-programming.qdoc
+++ b/src/widgets/doc/src/model-view-programming.qdoc
@@ -280,7 +280,7 @@
In the above example, we neglected to mention how to handle selections
of items. This subject is covered in more detail in the section about
- \l{Handling Selections in Item Views}.
+ \l{Handling Selections in Item Views}.
\section1 Model classes
diff --git a/src/widgets/doc/src/widgets-and-layouts/focus.qdoc b/src/widgets/doc/src/widgets-and-layouts/focus.qdoc
index 5cb7775c32..427d5a24d6 100644
--- a/src/widgets/doc/src/widgets-and-layouts/focus.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/focus.qdoc
@@ -34,7 +34,7 @@
\keyword keyboard focus
Qt's widgets handle keyboard focus in the ways that have become
- customary in GUIs.
+ customary in GUIs.
The basic issue is that the user's key strokes can be directed at any
of several windows on the screen, and any of several widgets inside
@@ -47,7 +47,7 @@
\section1 Focus Motion
The customs which have evolved for directing keyboard focus to a
- particular widget are these:
+ particular widget are these:
\list 1
@@ -89,7 +89,7 @@
For example, in a data entry dialog, there might be a field that
is only necessary in one per cent of all cases. In such a dialog,
\uicontrol Tab could skip this field, and the dialog could use one of
- these mechanisms:
+ these mechanisms:
\list 1
diff --git a/src/widgets/doc/src/widgets-and-layouts/layout.qdoc b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
index b658fc809c..f74da2fa0a 100644
--- a/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc
@@ -70,7 +70,7 @@
\endlist
\section1 Qt's Layout Classes
-
+
Qt's layout classes were designed for hand-written C++ code, allowing
measurements to be specified in pixels for simplicity, so they are easy to
understand and use. The code generated for forms created using Qt Designer also
@@ -136,11 +136,11 @@
the fifth argument to QGridLayout::addWidget().
QFormLayout will add two widgets on a row, commonly a QLabel and a QLineEdit
- to create forms. Adding a QLabel and a QLineEdit on the same row will set
- the QLineEdit as the QLabel's buddy. The following code will use the
+ to create forms. Adding a QLabel and a QLineEdit on the same row will set
+ the QLineEdit as the QLabel's buddy. The following code will use the
QFormLayout to place three \l{QPushButton}{QPushButtons} and a corresponding
- QLineEdit on a row.
-
+ QLineEdit on a row.
+
\snippet layouts/layouts.cpp 18
\snippet layouts/layouts.cpp 19
\snippet layouts/layouts.cpp 20
@@ -327,7 +327,7 @@
Then we define two functions that iterate over the layout: \c{itemAt()}
and \c{takeAt()}. These functions are used internally by the layout system
to handle deletion of widgets. They are also available for application
- programmers.
+ programmers.
\c{itemAt()} returns the item at the given index. \c{takeAt()} removes the
item at the given index, and returns it. In this case we use the list index
@@ -348,7 +348,7 @@
\snippet code/doc_src_layout.cpp 4
The layout takes over responsibility of the items added. Since QLayoutItem
- does not inherit QObject, we must delete the items manually. In the
+ does not inherit QObject, we must delete the items manually. In the
destructor, we remove each item from the list using \c{takeAt()}, and
then delete it.
diff --git a/src/widgets/doc/src/windows-and-dialogs/dialogs.qdoc b/src/widgets/doc/src/windows-and-dialogs/dialogs.qdoc
index 5aae7fb02b..1f1d8154da 100644
--- a/src/widgets/doc/src/windows-and-dialogs/dialogs.qdoc
+++ b/src/widgets/doc/src/windows-and-dialogs/dialogs.qdoc
@@ -29,7 +29,7 @@
\group standard-dialogs
\ingroup qt-gui-concepts
\title Standard Dialogs
- \brief A list of Qt classes for implementing standard dialogs.
+ \brief A list of Qt classes for implementing standard dialogs.
*/
/*!
@@ -37,7 +37,7 @@
\title Dialog Windows
\ingroup qt-gui-concepts
\brief An overview over dialog windows.
-
+
\previouspage Application Main Window
\contentspage Application Windows and Dialogs
\nextpage Desktop Integration
diff --git a/src/widgets/doc/src/windows-and-dialogs/mainwindow.qdoc b/src/widgets/doc/src/windows-and-dialogs/mainwindow.qdoc
index 1d7d9d1b4c..9315acb85f 100644
--- a/src/widgets/doc/src/windows-and-dialogs/mainwindow.qdoc
+++ b/src/widgets/doc/src/windows-and-dialogs/mainwindow.qdoc
@@ -49,7 +49,7 @@
be listed in the desktop's task bar. This is usually only wanted for one
window in the application, the \e{primary window}.
- In addition, a QWidget that has a parent can become a window by setting the
+ In addition, a QWidget that has a parent can become a window by setting the
Qt::Window flag. Depending on the window management system
such \e{secondary windows} are usually stacked on top of their respective parent
window, and not have a task bar entry of their own.