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>
This commit is contained in:
Axel Waggershauser 2013-03-15 00:42:15 +01:00 committed by The Qt Project
parent 72367a94a7
commit b11317a643
594 changed files with 3518 additions and 3541 deletions

View File

@ -81,26 +81,26 @@ bool BencodeParser::getByteString(QByteArray *byteString)
const int contentSize = content.size(); const int contentSize = content.size();
int size = -1; int size = -1;
do { do {
char c = content.at(index); char c = content.at(index);
if (c < '0' || c > '9') { if (c < '0' || c > '9') {
if (size == -1) if (size == -1)
return false; return false;
if (c != ':') { if (c != ':') {
errString = QString("Unexpected character at pos %1: %2") errString = QString("Unexpected character at pos %1: %2")
.arg(index).arg(c); .arg(index).arg(c);
return false; return false;
} }
++index; ++index;
break; break;
} }
if (size == -1) if (size == -1)
size = 0; size = 0;
size *= 10; size *= 10;
size += c - '0'; size += c - '0';
} while (++index < contentSize); } while (++index < contentSize);
if (byteString) if (byteString)
*byteString = content.mid(index, size); *byteString = content.mid(index, size);
index += size; index += size;
return true; return true;
} }
@ -109,38 +109,38 @@ bool BencodeParser::getInteger(qint64 *integer)
{ {
const int contentSize = content.size(); const int contentSize = content.size();
if (content.at(index) != 'i') if (content.at(index) != 'i')
return false; return false;
++index; ++index;
qint64 num = -1; qint64 num = -1;
bool negative = false; bool negative = false;
do { do {
char c = content.at(index); char c = content.at(index);
if (c < '0' || c > '9') { if (c < '0' || c > '9') {
if (num == -1) { if (num == -1) {
if (c != '-' || negative) if (c != '-' || negative)
return false; return false;
negative = true; negative = true;
continue; continue;
} else { } else {
if (c != 'e') { if (c != 'e') {
errString = QString("Unexpected character at pos %1: %2") errString = QString("Unexpected character at pos %1: %2")
.arg(index).arg(c); .arg(index).arg(c);
return false; return false;
} }
++index; ++index;
break; break;
} }
} }
if (num == -1) if (num == -1)
num = 0; num = 0;
num *= 10; num *= 10;
num += c - '0'; num += c - '0';
} while (++index < contentSize); } while (++index < contentSize);
if (integer) if (integer)
*integer = negative ? -num : num; *integer = negative ? -num : num;
return true; return true;
} }
@ -148,38 +148,38 @@ bool BencodeParser::getList(QList<QVariant> *list)
{ {
const int contentSize = content.size(); const int contentSize = content.size();
if (content.at(index) != 'l') if (content.at(index) != 'l')
return false; return false;
QList<QVariant> tmp; QList<QVariant> tmp;
++index; ++index;
do { do {
if (content.at(index) == 'e') { if (content.at(index) == 'e') {
++index; ++index;
break; break;
} }
qint64 number; qint64 number;
QByteArray byteString; QByteArray byteString;
QList<QVariant> tmpList; QList<QVariant> tmpList;
QMap<QByteArray, QVariant> dictionary; QMap<QByteArray, QVariant> dictionary;
if (getInteger(&number)) if (getInteger(&number))
tmp << number; tmp << number;
else if (getByteString(&byteString)) else if (getByteString(&byteString))
tmp << byteString; tmp << byteString;
else if (getList(&tmpList)) else if (getList(&tmpList))
tmp << tmpList; tmp << tmpList;
else if (getDictionary(&dictionary)) else if (getDictionary(&dictionary))
tmp << QVariant::fromValue<QMap<QByteArray, QVariant> >(dictionary); tmp << QVariant::fromValue<QMap<QByteArray, QVariant> >(dictionary);
else { else {
errString = QString("error at index %1").arg(index); errString = QString("error at index %1").arg(index);
return false; return false;
} }
} while (index < contentSize); } while (index < contentSize);
if (list) if (list)
*list = tmp; *list = tmp;
return true; return true;
} }
@ -187,48 +187,48 @@ bool BencodeParser::getDictionary(QMap<QByteArray, QVariant> *dictionary)
{ {
const int contentSize = content.size(); const int contentSize = content.size();
if (content.at(index) != 'd') if (content.at(index) != 'd')
return false; return false;
QMap<QByteArray, QVariant> tmp; QMap<QByteArray, QVariant> tmp;
++index; ++index;
do { do {
if (content.at(index) == 'e') { if (content.at(index) == 'e') {
++index; ++index;
break; break;
} }
QByteArray key; QByteArray key;
if (!getByteString(&key)) if (!getByteString(&key))
break; break;
if (key == "info") if (key == "info")
infoStart = index; infoStart = index;
qint64 number; qint64 number;
QByteArray byteString; QByteArray byteString;
QList<QVariant> tmpList; QList<QVariant> tmpList;
QMap<QByteArray, QVariant> dictionary; QMap<QByteArray, QVariant> dictionary;
if (getInteger(&number)) if (getInteger(&number))
tmp.insert(key, number); tmp.insert(key, number);
else if (getByteString(&byteString)) else if (getByteString(&byteString))
tmp.insert(key, byteString); tmp.insert(key, byteString);
else if (getList(&tmpList)) else if (getList(&tmpList))
tmp.insert(key, tmpList); tmp.insert(key, tmpList);
else if (getDictionary(&dictionary)) else if (getDictionary(&dictionary))
tmp.insert(key, QVariant::fromValue<QMap<QByteArray, QVariant> >(dictionary)); tmp.insert(key, QVariant::fromValue<QMap<QByteArray, QVariant> >(dictionary));
else { else {
errString = QString("error at index %1").arg(index); errString = QString("error at index %1").arg(index);
return false; return false;
} }
if (key == "info") if (key == "info")
infoLength = index - infoStart; infoLength = index - infoStart;
} while (index < contentSize); } while (index < contentSize);
if (dictionary) if (dictionary)
*dictionary = tmp; *dictionary = tmp;
return true; return true;
} }

View File

@ -51,7 +51,7 @@ QImage scale(const QString &imageFileName)
} }
Images::Images(QWidget *parent) Images::Images(QWidget *parent)
: QWidget(parent) : QWidget(parent)
{ {
setWindowTitle(tr("Image loading and scaling example")); setWindowTitle(tr("Image loading and scaling example"));
resize(800, 600); resize(800, 600);
@ -143,4 +143,3 @@ void Images::finished()
} }
#endif // QT_NO_CONCURRENT #endif // QT_NO_CONCURRENT

View File

@ -135,17 +135,17 @@
\list \list
\li If the editor widget has no user property defined, the delegate \li If the editor widget has no user property defined, the delegate
asks the factory for the property name, which it in turn asks the factory for the property name, which it in turn
asks the item editor creator for. In this case, you can use asks the item editor creator for. In this case, you can use
the QItemEditorCreator class, which takes the property the QItemEditorCreator class, which takes the property
name to use for editing as a constructor argument. name to use for editing as a constructor argument.
\li If the editor requires other constructors or other \li If the editor requires other constructors or other
initialization than provided by QItemEditorCreatorBase, you initialization than provided by QItemEditorCreatorBase, you
must reimplement must reimplement
QItemEditorCreatorBase::createWidget(). QItemEditorCreatorBase::createWidget().
\li You could also subclass QItemEditorFactory if you only want \li You could also subclass QItemEditorFactory if you only want
to provide editors for certain kinds of data or use another to provide editors for certain kinds of data or use another
method of creating the editors than using creator bases. method of creating the editors than using creator bases.
\endlist \endlist
In this example, we use a standard QVariant data type. You can In this example, we use a standard QVariant data type. You can

View File

@ -65,21 +65,21 @@
The example consists of the following classes: The example consists of the following classes:
\list \list
\li \c MainWindow creates the widgets and display \li \c MainWindow creates the widgets and display
them in a QMainWindow. It also manages the interaction them in a QMainWindow. It also manages the interaction
between the widgets and the graphics scene, view and between the widgets and the graphics scene, view and
items. items.
\li \c DiagramItem inherits QGraphicsPolygonItem and \li \c DiagramItem inherits QGraphicsPolygonItem and
represents a flowchart shape. represents a flowchart shape.
\li \c TextDiagramItem inherits QGraphicsTextItem and \li \c TextDiagramItem inherits QGraphicsTextItem and
represents text items in the diagram. The class adds represents text items in the diagram. The class adds
support for moving the item with the mouse, which is not support for moving the item with the mouse, which is not
supported by QGraphicsTextItem. supported by QGraphicsTextItem.
\li \c Arrow inherits QGraphicsLineItem and is an arrow \li \c Arrow inherits QGraphicsLineItem and is an arrow
that connect two DiagramItems. that connect two DiagramItems.
\li \c DiagramScene inherits QGraphicsDiagramScene and \li \c DiagramScene inherits QGraphicsDiagramScene and
provides support for \c DiagramItem, \c Arrow and provides support for \c DiagramItem, \c Arrow and
\c DiagramTextItem (In addition to the support already \c DiagramTextItem (In addition to the support already
handled by QGraphicsScene). handled by QGraphicsScene).
\endlist \endlist
\section1 MainWindow Class Definition \section1 MainWindow Class Definition

View File

@ -37,9 +37,9 @@
The items are first laid out horizontally and then vertically when each line The items are first laid out horizontally and then vertically when each line
in the layout runs out of space. in the layout runs out of space.
The Flowlayout class mainly uses QLayout and QWidgetItem, while the The Flowlayout class mainly uses QLayout and QWidgetItem, while the
Window uses QWidget and QLabel. We will only document the definition Window uses QWidget and QLabel. We will only document the definition
and implementation of \c FlowLayout below. and implementation of \c FlowLayout below.
\section1 FlowLayout Class Definition \section1 FlowLayout Class Definition
@ -122,24 +122,24 @@
\snippet layouts/flowlayout/flowlayout.cpp 10 \snippet layouts/flowlayout/flowlayout.cpp 10
It then sets the proper amount of spacing for each widget in the It then sets the proper amount of spacing for each widget in the
layout, based on the current style. layout, based on the current style.
\snippet layouts/flowlayout/flowlayout.cpp 11 \snippet layouts/flowlayout/flowlayout.cpp 11
The position of each item in the layout is then calculated by The position of each item in the layout is then calculated by
adding the items width and the line height to the initial x and y adding the items width and the line height to the initial x and y
coordinates. This in turn lets us find out whether the next item coordinates. This in turn lets us find out whether the next item
will fit on the current line or if it must be moved down to the next. will fit on the current line or if it must be moved down to the next.
We also find the height of the current line based on the widgets height. We also find the height of the current line based on the widgets height.
\snippet layouts/flowlayout/flowlayout.cpp 12 \snippet layouts/flowlayout/flowlayout.cpp 12
\c smartSpacing() is designed to get the default spacing for either \c smartSpacing() is designed to get the default spacing for either
the top-level layouts or the sublayouts. The default spacing for the top-level layouts or the sublayouts. The default spacing for
top-level layouts, when the parent is a QWidget, will be determined top-level layouts, when the parent is a QWidget, will be determined
by querying the style. The default spacing for sublayouts, when by querying the style. The default spacing for sublayouts, when
the parent is a QLayout, will be determined by querying the spacing the parent is a QLayout, will be determined by querying the spacing
of the parent layout. of the parent layout.
*/ */

View File

@ -61,16 +61,16 @@
The example consists of the following: The example consists of the following:
\list \list
\li The \c MainWindow class inherits QMainWindow and creates \li The \c MainWindow class inherits QMainWindow and creates
the examples menus and connect their slots and signals. the examples menus and connect their slots and signals.
\li The \c TabletCanvas class inherits QWidget and \li The \c TabletCanvas class inherits QWidget and
receives tablet events. It uses the events to paint on a receives tablet events. It uses the events to paint on a
offscreen pixmap, which it draws onto itself. offscreen pixmap, which it draws onto itself.
\li The \c TabletApplication class inherits QApplication. This \li The \c TabletApplication class inherits QApplication. This
class handles tablet events that are not sent to \c tabletEvent(). class handles tablet events that are not sent to \c tabletEvent().
We will look at this later. We will look at this later.
\li The \c main() function creates a \c MainWindow and shows it \li The \c main() function creates a \c MainWindow and shows it
as a top level window. as a top level window.
\endlist \endlist

View File

@ -78,7 +78,7 @@ bool MyModel::setData(const QModelIndex & index, const QVariant & value, int rol
//save value from editor to member m_gridData //save value from editor to member m_gridData
m_gridData[index.row()][index.column()] = value.toString(); m_gridData[index.row()][index.column()] = value.toString();
//for presentation purposes only: build and emit a joined string //for presentation purposes only: build and emit a joined string
QString result; QString result;
for(int row= 0; row < ROWS; row++) for(int row= 0; row < ROWS; row++)
{ {
for(int col= 0; col < COLS; col++) for(int col= 0; col < COLS; col++)

View File

@ -4,73 +4,73 @@
# Written for Qt/X11 on Windows using Cygwin's POSIX API # Written for Qt/X11 on Windows using Cygwin's POSIX API
# #
MAKEFILE_GENERATOR = UNIX MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = cygwin unix posix QMAKE_PLATFORM = cygwin unix posix
CONFIG += incremental CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_COMPILER = gcc QMAKE_COMPILER = gcc
QMAKE_CC = gcc QMAKE_CC = gcc
QMAKE_LEX = flex QMAKE_LEX = flex
QMAKE_LEXFLAGS = QMAKE_LEXFLAGS =
QMAKE_YACC = byacc QMAKE_YACC = byacc
QMAKE_YACCFLAGS = -d QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -pipe QMAKE_CFLAGS = -pipe
QMAKE_CFLAGS_DEPS = -M QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w QMAKE_CFLAGS_WARN_OFF = -w
QMAKE_CFLAGS_RELEASE = -O2 QMAKE_CFLAGS_RELEASE = -O2
QMAKE_CFLAGS_DEBUG = -g QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = QMAKE_CFLAGS_SHLIB =
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_THREAD = -D_REENTRANT QMAKE_CFLAGS_THREAD = -D_REENTRANT
QMAKE_CXX = g++ QMAKE_CXX = g++
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
QMAKE_INCDIR = QMAKE_INCDIR =
QMAKE_LIBDIR = QMAKE_LIBDIR =
QMAKE_INCDIR_X11 = /usr/X11R6/include QMAKE_INCDIR_X11 = /usr/X11R6/include
QMAKE_LIBDIR_X11 = /usr/X11R6/lib QMAKE_LIBDIR_X11 = /usr/X11R6/lib
QMAKE_INCDIR_OPENGL = /usr/X11R6/include QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_LINK = g++ QMAKE_LINK = g++
QMAKE_LINK_SHLIB = g++ QMAKE_LINK_SHLIB = g++
QMAKE_LINK_C = gcc QMAKE_LINK_C = gcc
QMAKE_LINK_C_SHLIB = gcc QMAKE_LINK_C_SHLIB = gcc
QMAKE_LFLAGS = QMAKE_LFLAGS =
QMAKE_LFLAGS_RELEASE = QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG = QMAKE_LFLAGS_DEBUG =
QMAKE_LFLAGS_SHLIB = -shared QMAKE_LFLAGS_SHLIB = -shared
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME = -Wl,-soname, QMAKE_LFLAGS_SONAME = -Wl,-soname,
QMAKE_LFLAGS_THREAD = QMAKE_LFLAGS_THREAD =
QMAKE_LFLAGS_RPATH = -Wl,-rpath, QMAKE_LFLAGS_RPATH = -Wl,-rpath,
QMAKE_CYGWIN_SHLIB = 1 QMAKE_CYGWIN_SHLIB = 1
QMAKE_CYGWIN_EXE = 1 QMAKE_CYGWIN_EXE = 1
QMAKE_LIBS = QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD = -ldl QMAKE_LIBS_DYNLOAD = -ldl
QMAKE_LIBS_X11 = -lXext -lX11 QMAKE_LIBS_X11 = -lXext -lX11
QMAKE_LIBS_OPENGL = -lGL QMAKE_LIBS_OPENGL = -lGL
QMAKE_LIBS_THREAD = -lpthread QMAKE_LIBS_THREAD = -lpthread
QMAKE_PREFIX_SHLIB = lib QMAKE_PREFIX_SHLIB = lib
QMAKE_PREFIX_STATICLIB = lib QMAKE_PREFIX_STATICLIB = lib
QMAKE_EXTENSION_STATICLIB = a QMAKE_EXTENSION_STATICLIB = a
QMAKE_AR = ar cqs QMAKE_AR = ar cqs
QMAKE_OBJCOPY = objcopy QMAKE_OBJCOPY = objcopy
QMAKE_RANLIB = QMAKE_RANLIB =
include(../common/shell-unix.conf) include(../common/shell-unix.conf)
load(qt_config) load(qt_config)

View File

@ -4,109 +4,109 @@
# We define _POSIX_C_SOURCE to 199506L when using threads, therefore # We define _POSIX_C_SOURCE to 199506L when using threads, therefore
# we also need to redefine _HPUX_SOURCE. # we also need to redefine _HPUX_SOURCE.
# From pthread(3t): # From pthread(3t):
# Some documentation will recommend the use of -D_REENTRANT for # Some documentation will recommend the use of -D_REENTRANT for
# compilation. While this also functions properly, it is considered # compilation. While this also functions properly, it is considered
# an obsolescent form. # an obsolescent form.
# See pthread(3t) for more details. # See pthread(3t) for more details.
# #
# From the "HP aC++ Online Programmer's Guide": # From the "HP aC++ Online Programmer's Guide":
# When +DA2.0W is specified: # When +DA2.0W is specified:
# * 64-bit SVR4 Executable and Linking Format (ELF) object files # * 64-bit SVR4 Executable and Linking Format (ELF) object files
# are generated for PA-RISC 2.0. # are generated for PA-RISC 2.0.
# * The preprocessor predefined macro, __LP64__ is defined. # * The preprocessor predefined macro, __LP64__ is defined.
# * The correct path for 64-bit system and language libraries is # * The correct path for 64-bit system and language libraries is
# selected. # selected.
# When +DD32 is specified: # When +DD32 is specified:
# * The size of an int, long, or pointer data type is 32-bits. # * The size of an int, long, or pointer data type is 32-bits.
# The size of an int data type is 32-bits. The size of a long or # The size of an int data type is 32-bits. The size of a long or
# pointer data type is 64-bits. # pointer data type is 64-bits.
# * This is the default, currently equivalent to +DA1.1 architecture. # * This is the default, currently equivalent to +DA1.1 architecture.
# When +DD64 is specified: # When +DD64 is specified:
# * The size of an int data type is 32-bits. The size of a long or # * The size of an int data type is 32-bits. The size of a long or
# pointer data type is 64-bits. # pointer data type is 64-bits.
# * This is currently equivalent to +DA2.OW architecture. # * This is currently equivalent to +DA2.OW architecture.
# * The preprocessor predefined macro, __LP64__ is defined. # * The preprocessor predefined macro, __LP64__ is defined.
# Using +DS to Specify Instruction Scheduling: # Using +DS to Specify Instruction Scheduling:
# * By default, the compiler performs scheduling tuned for the system # * By default, the compiler performs scheduling tuned for the system
# on which you are compiling, or, if specified, tuned for the setting # on which you are compiling, or, if specified, tuned for the setting
# of the +DA option. # of the +DA option.
# #
# From the online "C/HP-UX Reference Manual": # From the online "C/HP-UX Reference Manual":
# -Aa # -Aa
# Enables strict ANSI C compliance. # Enables strict ANSI C compliance.
# -Ae # -Ae
# Enables ANSI C compliance, HP value-added features (as described # Enables ANSI C compliance, HP value-added features (as described
# for +e option), and _HPUX_SOURCE name space macro. It is equivalent # for +e option), and _HPUX_SOURCE name space macro. It is equivalent
# to -Aa +e -D_HPUX_SOURCE. # to -Aa +e -D_HPUX_SOURCE.
# +e # +e
# Enables the following HP value added features while compiling in # Enables the following HP value added features while compiling in
# ANSI C mode: sized enum, long long, long pointers, compiler supplied # ANSI C mode: sized enum, long long, long pointers, compiler supplied
# defaults for missing arguments to intrinsic calls, and $ in identifier # defaults for missing arguments to intrinsic calls, and $ in identifier
# HP C extensions. # HP C extensions.
# #
MAKEFILE_GENERATOR = UNIX MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = hpux QMAKE_PLATFORM = hpux
QMAKE_COMPILER = hp_acc QMAKE_COMPILER = hp_acc
QMAKE_CC = cc QMAKE_CC = cc
QMAKE_LEX = flex QMAKE_LEX = flex
QMAKE_LEXFLAGS = QMAKE_LEXFLAGS =
QMAKE_YACC = yacc QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -Ae +DA2.0 -w QMAKE_CFLAGS = -Ae +DA2.0 -w
QMAKE_CFLAGS_WARN_ON = QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF = QMAKE_CFLAGS_WARN_OFF =
QMAKE_CFLAGS_RELEASE = -O +Oentrysched +Onolimit QMAKE_CFLAGS_RELEASE = -O +Oentrysched +Onolimit
QMAKE_CFLAGS_DEBUG = -y -g QMAKE_CFLAGS_DEBUG = -y -g
QMAKE_CFLAGS_SHLIB = +Z QMAKE_CFLAGS_SHLIB = +Z
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE
QMAKE_CXX = aCC QMAKE_CXX = aCC
QMAKE_CXXFLAGS = +DA2.0 -w -D__STRICT_ANSI__ -D_HPUX_SOURCE QMAKE_CXXFLAGS = +DA2.0 -w -D__STRICT_ANSI__ -D_HPUX_SOURCE
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = -g QMAKE_CXXFLAGS_DEBUG = -g
QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L
QMAKE_INCDIR = QMAKE_INCDIR =
QMAKE_LIBDIR = QMAKE_LIBDIR =
QMAKE_INCDIR_X11 = /usr/include/X11R6 QMAKE_INCDIR_X11 = /usr/include/X11R6
QMAKE_LIBDIR_X11 = /usr/lib/X11R6 QMAKE_LIBDIR_X11 = /usr/lib/X11R6
QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include
QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib /usr/contrib/X11R6/lib QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib /usr/contrib/X11R6/lib
QMAKE_LINK = aCC QMAKE_LINK = aCC
QMAKE_LINK_SHLIB = aCC QMAKE_LINK_SHLIB = aCC
QMAKE_LFLAGS = +DA2.0 -Wl,+s QMAKE_LFLAGS = +DA2.0 -Wl,+s
QMAKE_LFLAGS_RELEASE = -O QMAKE_LFLAGS_RELEASE = -O
QMAKE_LFLAGS_DEBUG = QMAKE_LFLAGS_DEBUG =
QMAKE_LFLAGS_SHLIB = -b QMAKE_LFLAGS_SHLIB = -b
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME = -Wl,+h, QMAKE_LFLAGS_SONAME = -Wl,+h,
QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats
QMAKE_LFLAGS_RPATH = -Wl,+b, QMAKE_LFLAGS_RPATH = -Wl,+b,
QMAKE_HPUX_SHLIB = 2 QMAKE_HPUX_SHLIB = 2
QMAKE_EXTENSION_SHLIB = sl QMAKE_EXTENSION_SHLIB = sl
QMAKE_LIBS = -lm QMAKE_LIBS = -lm
QMAKE_LIBS_DYNLOAD = -ldld QMAKE_LIBS_DYNLOAD = -ldld
QMAKE_LIBS_X11 = -lXext -lX11 QMAKE_LIBS_X11 = -lXext -lX11
QMAKE_LIBS_OPENGL = -lGL QMAKE_LIBS_OPENGL = -lGL
QMAKE_LIBS_THREAD = -lpthread QMAKE_LIBS_THREAD = -lpthread
QMAKE_LIBS_YACC = -ly QMAKE_LIBS_YACC = -ly
QMAKE_AR = ar cqs QMAKE_AR = ar cqs
QMAKE_OBJCOPY = objcopy QMAKE_OBJCOPY = objcopy
QMAKE_RANLIB = QMAKE_RANLIB =
include(../common/unix.conf) include(../common/unix.conf)
load(qt_config) load(qt_config)

View File

@ -5,72 +5,72 @@
# therefore we also need to redefine _HPUX_SOURCE. # therefore we also need to redefine _HPUX_SOURCE.
# #
MAKEFILE_GENERATOR = UNIX MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = hpux QMAKE_PLATFORM = hpux
QMAKE_COMPILER = gcc QMAKE_COMPILER = gcc
QMAKE_CC = gcc QMAKE_CC = gcc
QMAKE_LEX = flex QMAKE_LEX = flex
QMAKE_LEXFLAGS = QMAKE_LEXFLAGS =
QMAKE_YACC = yacc QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = QMAKE_CFLAGS =
QMAKE_CFLAGS_DEPS = -M QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w QMAKE_CFLAGS_WARN_OFF = -w
QMAKE_CFLAGS_RELEASE = -O2 QMAKE_CFLAGS_RELEASE = -O2
QMAKE_CFLAGS_DEBUG = -g QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC QMAKE_CFLAGS_SHLIB = -fPIC
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE
QMAKE_CXX = g++ QMAKE_CXX = g++
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D_HPUX_SOURCE QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D_HPUX_SOURCE
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L
QMAKE_INCDIR = QMAKE_INCDIR =
QMAKE_LIBDIR = /usr/lib/pa20_64 QMAKE_LIBDIR = /usr/lib/pa20_64
QMAKE_INCDIR_X11 = /usr/include/X11R6 QMAKE_INCDIR_X11 = /usr/include/X11R6
QMAKE_LIBDIR_X11 = /usr/lib/X11R6/pa20_64 QMAKE_LIBDIR_X11 = /usr/lib/X11R6/pa20_64
QMAKE_INCDIR_OPENGL = /opt/Mesa/include /usr/contrib/X11R6/include QMAKE_INCDIR_OPENGL = /opt/Mesa/include /usr/contrib/X11R6/include
QMAKE_LIBDIR_OPENGL = /opt/Mesa/lib/pa20_64 /usr/contrib/X11R6/lib/pa20_64 QMAKE_LIBDIR_OPENGL = /opt/Mesa/lib/pa20_64 /usr/contrib/X11R6/lib/pa20_64
QMAKE_LINK = g++ QMAKE_LINK = g++
QMAKE_LINK_SHLIB = g++ QMAKE_LINK_SHLIB = g++
QMAKE_LINK_C = gcc QMAKE_LINK_C = gcc
QMAKE_LINK_C_SHLIB = gcc QMAKE_LINK_C_SHLIB = gcc
QMAKE_LFLAGS = -Wl,+s -lpthread QMAKE_LFLAGS = -Wl,+s -lpthread
QMAKE_LFLAGS_RELEASE = QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG = QMAKE_LFLAGS_DEBUG =
QMAKE_LFLAGS_SHLIB = -fPIC -shared QMAKE_LFLAGS_SHLIB = -fPIC -shared
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME = -Wl,+h, QMAKE_LFLAGS_SONAME = -Wl,+h,
QMAKE_LFLAGS_THREAD = QMAKE_LFLAGS_THREAD =
QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats
QMAKE_LFLAGS_RPATH = -Wl,+b, QMAKE_LFLAGS_RPATH = -Wl,+b,
QMAKE_HPUX_SHLIB = 3 QMAKE_HPUX_SHLIB = 3
QMAKE_EXTENSION_SHLIB = sl QMAKE_EXTENSION_SHLIB = sl
QMAKE_LIBS = -lm QMAKE_LIBS = -lm
QMAKE_LIBS_DYNLOAD = -ldld QMAKE_LIBS_DYNLOAD = -ldld
QMAKE_LIBS_X11 = -lXext -lX11 QMAKE_LIBS_X11 = -lXext -lX11
QMAKE_LIBS_OPENGL = -lGL QMAKE_LIBS_OPENGL = -lGL
QMAKE_LIBS_THREAD = -lpthread QMAKE_LIBS_THREAD = -lpthread
QMAKE_LIBS_YACC = -ly QMAKE_LIBS_YACC = -ly
QMAKE_AR = ar cqs QMAKE_AR = ar cqs
QMAKE_OBJCOPY = objcopy QMAKE_OBJCOPY = objcopy
QMAKE_RANLIB = QMAKE_RANLIB =
include(../common/unix.conf) include(../common/unix.conf)
load(qt_config) load(qt_config)

View File

@ -4,109 +4,109 @@
# We define _POSIX_C_SOURCE to 199506L when using threads, therefore # We define _POSIX_C_SOURCE to 199506L when using threads, therefore
# we also need to redefine _HPUX_SOURCE. # we also need to redefine _HPUX_SOURCE.
# From pthread(3t): # From pthread(3t):
# Some documentation will recommend the use of -D_REENTRANT for # Some documentation will recommend the use of -D_REENTRANT for
# compilation. While this also functions properly, it is considered # compilation. While this also functions properly, it is considered
# an obsolescent form. # an obsolescent form.
# See pthread(3t) for more details. # See pthread(3t) for more details.
# #
# From the "HP aC++ Online Programmer's Guide": # From the "HP aC++ Online Programmer's Guide":
# When +DA2.0W is specified: # When +DA2.0W is specified:
# * 64-bit SVR4 Executable and Linking Format (ELF) object files # * 64-bit SVR4 Executable and Linking Format (ELF) object files
# are generated for PA-RISC 2.0. # are generated for PA-RISC 2.0.
# * The preprocessor predefined macro, __LP64__ is defined. # * The preprocessor predefined macro, __LP64__ is defined.
# * The correct path for 64-bit system and language libraries is # * The correct path for 64-bit system and language libraries is
# selected. # selected.
# When +DD32 is specified: # When +DD32 is specified:
# * The size of an int, long, or pointer data type is 32-bits. # * The size of an int, long, or pointer data type is 32-bits.
# The size of an int data type is 32-bits. The size of a long or # The size of an int data type is 32-bits. The size of a long or
# pointer data type is 64-bits. # pointer data type is 64-bits.
# * This is the default, currently equivalent to +DA1.1 architecture. # * This is the default, currently equivalent to +DA1.1 architecture.
# When +DD64 is specified: # When +DD64 is specified:
# * The size of an int data type is 32-bits. The size of a long or # * The size of an int data type is 32-bits. The size of a long or
# pointer data type is 64-bits. # pointer data type is 64-bits.
# * This is currently equivalent to +DA2.OW architecture. # * This is currently equivalent to +DA2.OW architecture.
# * The preprocessor predefined macro, __LP64__ is defined. # * The preprocessor predefined macro, __LP64__ is defined.
# Using +DS to Specify Instruction Scheduling: # Using +DS to Specify Instruction Scheduling:
# * By default, the compiler performs scheduling tuned for the system # * By default, the compiler performs scheduling tuned for the system
# on which you are compiling, or, if specified, tuned for the setting # on which you are compiling, or, if specified, tuned for the setting
# of the +DA option. # of the +DA option.
# #
# From the online "C/HP-UX Reference Manual": # From the online "C/HP-UX Reference Manual":
# -Aa # -Aa
# Enables strict ANSI C compliance. # Enables strict ANSI C compliance.
# -Ae # -Ae
# Enables ANSI C compliance, HP value-added features (as described # Enables ANSI C compliance, HP value-added features (as described
# for +e option), and _HPUX_SOURCE name space macro. It is equivalent # for +e option), and _HPUX_SOURCE name space macro. It is equivalent
# to -Aa +e -D_HPUX_SOURCE. # to -Aa +e -D_HPUX_SOURCE.
# +e # +e
# Enables the following HP value added features while compiling in # Enables the following HP value added features while compiling in
# ANSI C mode: sized enum, long long, long pointers, compiler supplied # ANSI C mode: sized enum, long long, long pointers, compiler supplied
# defaults for missing arguments to intrinsic calls, and $ in identifier # defaults for missing arguments to intrinsic calls, and $ in identifier
# HP C extensions. # HP C extensions.
# #
MAKEFILE_GENERATOR = UNIX MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = hpux QMAKE_PLATFORM = hpux
CONFIG += plugin_no_soname CONFIG += plugin_no_soname
QMAKE_COMPILER = hp_acc QMAKE_COMPILER = hp_acc
QMAKE_CC = cc QMAKE_CC = cc
QMAKE_LEX = lex QMAKE_LEX = lex
QMAKE_LEXFLAGS = QMAKE_LEXFLAGS =
QMAKE_YACC = yacc QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = +DD64 +DSitanium -w QMAKE_CFLAGS = +DD64 +DSitanium -w
QMAKE_CFLAGS_WARN_ON = QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF = -w QMAKE_CFLAGS_WARN_OFF = -w
QMAKE_CFLAGS_RELEASE = +O1 QMAKE_CFLAGS_RELEASE = +O1
QMAKE_CFLAGS_DEBUG = -g QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = +Z QMAKE_CFLAGS_SHLI = +Z
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -D_REENTRANT -mt QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -D_REENTRANT -mt
QMAKE_CXX = aCC QMAKE_CXX = aCC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D__STRICT_ANSI__ -D_HPUX_SOURCE QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D__STRICT_ANSI__ -D_HPUX_SOURCE
QMAKE_CXXFLAGS_DEPS = +M QMAKE_CXXFLAGS_DEPS = +M
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB QMAKE_CXXFLAGS_STATIC_LB = $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_REENTRANT -mt QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_REENTRANT -mt
QMAKE_INCDIR = QMAKE_INCDIR =
QMAKE_LIBDIR = QMAKE_LIBDIR =
QMAKE_INCDIR_X11 = /usr/include/X11R6 QMAKE_INCDIR_X11 = /usr/include/X11R6
QMAKE_LIBDIR_X11 = /usr/lib/hpux64/X11R6 QMAKE_LIBDIR_X11 = /usr/lib/hpux64/X11R6
QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include
QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib/hpux64 /usr/contrib/X11R6/lib/hpux64 QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib/hpux64 /usr/contrib/X11R6/lib/hpux64
QMAKE_LINK = aCC QMAKE_LINK = aCC
QMAKE_LINK_SHLIB = aCC QMAKE_LINK_SHLIB = aCC
QMAKE_LFLAGS = +DD64 +DSitanium -Wl,+s QMAKE_LFLAGS = +DD64 +DSitanium -Wl,+s
QMAKE_LFLAGS_RELEASE = -O QMAKE_LFLAGS_RELEASE = -O
QMAKE_LFLAGS_DEBUG = -g QMAKE_LFLAGS_DEBUG = -g
QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME = -Wl,+h, QMAKE_LFLAGS_SONAME = -Wl,+h,
QMAKE_LFLAGS_THREAD = QMAKE_LFLAGS_THREAD =
QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats
QMAKE_LFLAGS_RPATH = QMAKE_LFLAGS_RPATH =
QMAKE_LIBS = -lm QMAKE_LIBS = -lm
QMAKE_LIBS_DYNLOAD = -ldl QMAKE_LIBS_DYNLOAD = -ldl
QMAKE_LIBS_X11 = -lXext -lX11 QMAKE_LIBS_X11 = -lXext -lX11
QMAKE_LIBS_OPENGL = -lGL -lXt QMAKE_LIBS_OPENGL = -lGL -lXt
QMAKE_LIBS_THREAD = -lpthread QMAKE_LIBS_THREAD = -lpthread
QMAKE_LIBS_YACC = -ly QMAKE_LIBS_YACC = -ly
QMAKE_AR = ar cqs QMAKE_AR = ar cqs
QMAKE_OBJCOPY = objcopy QMAKE_OBJCOPY = objcopy
QMAKE_RANLIB = QMAKE_RANLIB =
include(../common/unix.conf) include(../common/unix.conf)
load(qt_config) load(qt_config)

View File

@ -12,61 +12,61 @@
# warning #1569: potential redeclared typedef # warning #1569: potential redeclared typedef
# #
MAKEFILE_GENERATOR = UNIX MAKEFILE_GENERATOR = UNIX
CONFIG += app_bundle CONFIG += app_bundle
QMAKE_INCREMENTAL_STYLE = sublibs QMAKE_INCREMENTAL_STYLE = sublibs
QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__ QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__
QMAKE_COMPILER = gcc intel_icc # icc pretends to be gcc QMAKE_COMPILER = gcc intel_icc # icc pretends to be gcc
QMAKE_CC = icc QMAKE_CC = icc
QMAKE_CFLAGS = -wd858,1572,1569,279 QMAKE_CFLAGS = -wd858,1572,1569,279
QMAKE_CFLAGS_DEPS = -M QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF = -w QMAKE_CFLAGS_WARN_OFF = -w
QMAKE_CFLAGS_RELEASE = QMAKE_CFLAGS_RELEASE =
QMAKE_CFLAGS_DEBUG = -g QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fpic QMAKE_CFLAGS_SHLIB = -fpic
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_THREAD = QMAKE_CFLAGS_THREAD =
QMAKE_OBJECTIVE_CC = gcc QMAKE_OBJECTIVE_CC = gcc
QMAKE_OBJECTIVE_CFLAGS = -pipe QMAKE_OBJECTIVE_CFLAGS = -pipe
QMAKE_OBJECTIVE_CFLAGS_WARN_ON = -Wall -W QMAKE_OBJECTIVE_CFLAGS_WARN_ON = -Wall -W
QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = -w QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = -w
QMAKE_OBJECTIVE_CFLAGS_RELEASE = -Os QMAKE_OBJECTIVE_CFLAGS_RELEASE = -Os
QMAKE_OBJECTIVE_CFLAGS_DEBUG = -g QMAKE_OBJECTIVE_CFLAGS_DEBUG = -g
QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = -fvisibility=hidden QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = -fvisibility=hidden
QMAKE_CXX = icpc QMAKE_CXX = icpc
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
QMAKE_LINK = icpc QMAKE_LINK = icpc
QMAKE_LINK_SHLIB = icpc QMAKE_LINK_SHLIB = icpc
QMAKE_LFLAGS = -headerpad_max_install_names QMAKE_LFLAGS = -headerpad_max_install_names
QMAKE_LFLAGS_RELEASE = QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG = QMAKE_LFLAGS_DEBUG =
QMAKE_LFLAGS_SHLIB = -single_module -dynamiclib QMAKE_LFLAGS_SHLIB = -ingle_module -dynamiclib
QMAKE_LFLAGS_INCREMENTAL = -undefined suppress -flat_namespace QMAKE_LFLAGS_INCREMENTAL = -undefined suppress -flat_namespace
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME = -install_name$${LITERAL_WHITESPACE} QMAKE_LFLAGS_SONAME = -install_name$${LITERAL_WHITESPACE}
QMAKE_LFLAGS_THREAD = QMAKE_LFLAGS_THREAD =
QMAKE_LFLAGS_RPATH = QMAKE_LFLAGS_RPATH =
QMAKE_LFLAGS_VERSION = -current_version$${LITERAL_WHITESPACE} QMAKE_LFLAGS_VERSION = -current_version$${LITERAL_WHITESPACE}
QMAKE_LFLAGS_COMPAT_VERSION = -compatibility_version$${LITERAL_WHITESPACE} QMAKE_LFLAGS_COMPAT_VERSION = -compatibility_version$${LITERAL_WHITESPACE}
QMAKE_CLEAN = -r $(OBJECTS_DIR)/ti_files QMAKE_CLEAN = -r $(OBJECTS_DIR)/ti_files
include(../common/macx.conf) include(../common/macx.conf)

View File

@ -4,14 +4,14 @@
# Mac OS X + XCode # Mac OS X + XCode
# #
MAKEFILE_GENERATOR = XCODE MAKEFILE_GENERATOR = XCODE
CONFIG += lib_version_first incremental plugin_no_soname app_bundle CONFIG += lib_version_first incremental plugin_no_soname app_bundle
include(../common/macx.conf) include(../common/macx.conf)
include(../common/gcc-base-mac.conf) include(../common/gcc-base-mac.conf)
include(../common/g++-macx.conf) include(../common/g++-macx.conf)
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
QMAKE_LINK = QMAKE_LINK =
QMAKE_LINK_C = QMAKE_LINK_C =
@ -21,6 +21,6 @@ QMAKE_CFLAGS_HIDESYMS =
QMAKE_LFLAGS_VERSION = QMAKE_LFLAGS_VERSION =
QMAKE_LFLAGS_COMPAT_VERSION = QMAKE_LFLAGS_COMPAT_VERSION =
QMAKE_LFLAGS_SONAME = QMAKE_LFLAGS_SONAME =
QMAKE_INCDIR += /usr/local/include /System/Library/Frameworks/CarbonCore.framework/Headers QMAKE_INCDIR += /usr/local/include /System/Library/Frameworks/CarbonCore.framework/Headers
load(qt_config) load(qt_config)

View File

@ -65,16 +65,16 @@
#if !defined(_WIN32_WINNT) || (_WIN32_WINNT-0 < 0x0500) #if !defined(_WIN32_WINNT) || (_WIN32_WINNT-0 < 0x0500)
typedef enum { typedef enum {
NameUnknown = 0, NameUnknown = 0,
NameFullyQualifiedDN = 1, NameFullyQualifiedDN = 1,
NameSamCompatible = 2, NameSamCompatible = 2,
NameDisplay = 3, NameDisplay = 3,
NameUniqueId = 6, NameUniqueId = 6,
NameCanonical = 7, NameCanonical = 7,
NameUserPrincipal = 8, NameUserPrincipal = 8,
NameCanonicalEx = 9, NameCanonicalEx = 9,
NameServicePrincipal = 10, NameServicePrincipal = 10,
NameDnsDomain = 12 NameDnsDomain = 12
} EXTENDED_NAME_FORMAT, *PEXTENDED_NAME_FORMAT; } EXTENDED_NAME_FORMAT, *PEXTENDED_NAME_FORMAT;
#endif #endif

View File

@ -4,72 +4,72 @@
# Written for Intel C++ # Written for Intel C++
# #
MAKEFILE_GENERATOR = MSVC.NET MAKEFILE_GENERATOR = MSVC.NET
QMAKE_PLATFORM = win32 QMAKE_PLATFORM = win32
CONFIG += incremental flat debug_and_release debug_and_release_target CONFIG += incremental flat debug_and_release debug_and_release_target
DEFINES += UNICODE DEFINES += UNICODE
QMAKE_COMPILER_DEFINES += __INTEL_COMPILER WIN32 QMAKE_COMPILER_DEFINES += __INTEL_COMPILER WIN32
QMAKE_COMPILER = msvc intel_icl # icl pretends to be msvc QMAKE_COMPILER = msvc intel_icl # icl pretends to be msvc
QMAKE_CC = icl QMAKE_CC = icl
QMAKE_LEX = flex QMAKE_LEX = flex
QMAKE_LEXFLAGS = QMAKE_LEXFLAGS =
QMAKE_YACC = byacc QMAKE_YACC = byacc
QMAKE_YACCFLAGS = -d QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -nologo -Zm200 /Qprec /Qwd1744,1738 QMAKE_CFLAGS = -nologo -Zm200 /Qprec /Qwd1744,1738
QMAKE_CFLAGS_WARN_ON = -W3 /Qwd673 QMAKE_CFLAGS_WARN_ON = -W3 /Qwd673
QMAKE_CFLAGS_WARN_OFF = -W0 /Qwd673 QMAKE_CFLAGS_WARN_OFF = -W0 /Qwd673
QMAKE_CFLAGS_RELEASE = -O2 -MD QMAKE_CFLAGS_RELEASE = -O2 -MD
# Giving -O2 to debug builds should make icc 9.1 happy, but it might make debugging harder, so it might be reverted. # Giving -O2 to debug builds should make icc 9.1 happy, but it might make debugging harder, so it might be reverted.
# This is actually a workaround for a bug in icc 9.1. # This is actually a workaround for a bug in icc 9.1.
QMAKE_CFLAGS_DEBUG = -Zi -MDd -O2 QMAKE_CFLAGS_DEBUG = -Zi -MDd -O2
QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_YACC =
QMAKE_CXX = $$QMAKE_CC QMAKE_CXX = $$QMAKE_CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS /Zc:forScope QMAKE_CXXFLAGS = $$QMAKE_CFLAGS /Zc:forScope
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_STL_ON = -GX QMAKE_CXXFLAGS_STL_ON = -GX
QMAKE_CXXFLAGS_STL_OFF = QMAKE_CXXFLAGS_STL_OFF =
QMAKE_CXXFLAGS_RTTI_ON = -GR QMAKE_CXXFLAGS_RTTI_ON = -GR
QMAKE_CXXFLAGS_RTTI_OFF = QMAKE_CXXFLAGS_RTTI_OFF =
QMAKE_CXXFLAGS_EXCEPTIONS_ON = -GX QMAKE_CXXFLAGS_EXCEPTIONS_ON = -GX
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
QMAKE_INCDIR = QMAKE_INCDIR =
QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $< QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<
QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $< QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
QMAKE_LINK = xilink QMAKE_LINK = xilink
QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS = /NOLOGO
QMAKE_LFLAGS_RELEASE = QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_DEBUG = /DEBUG
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:console QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:console
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:windows QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:windows
QMAKE_LFLAGS_DLL = /DLL QMAKE_LFLAGS_DLL = /DLL
QMAKE_LIBS = QMAKE_LIBS =
QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib ws2_32.lib ole32.lib user32.lib advapi32.lib QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
QMAKE_LIBS_NETWORK = ws2_32.lib QMAKE_LIBS_NETWORK = ws2_32.lib
QMAKE_LIBS_OPENGL = glu32.lib opengl32.lib gdi32.lib user32.lib delayimp.lib QMAKE_LIBS_OPENGL = glu32.lib opengl32.lib gdi32.lib user32.lib delayimp.lib
QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
QMAKE_LIBS_QT_ENTRY = -lqtmain QMAKE_LIBS_QT_ENTRY = -lqtmain
QMAKE_IDL = midl QMAKE_IDL = midl
QMAKE_LIB = xilib /NOLOGO QMAKE_LIB = xilib /NOLOGO
QMAKE_RC = rc QMAKE_RC = rc
include(../common/shell-win32.conf) include(../common/shell-win32.conf)
DSP_EXTENSION = .dsp DSP_EXTENSION = .dsp
load(qt_config) load(qt_config)

View File

@ -1,13 +1,13 @@
include(../wincewm50pocket-msvc2005/qmake.conf) include(../wincewm50pocket-msvc2005/qmake.conf)
CE_SDK = Windows Mobile 6 Professional SDK CE_SDK = Windows Mobile 6 Professional SDK
CE_ARCH = ARMV4I CE_ARCH = ARMV4I
DEFINES -= _WIN32_WCE=0x501 DEFINES -= _WIN32_WCE=0x501
DEFINES += _WIN32_WCE=0x502 DEFINES += _WIN32_WCE=0x502
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB /ENTRY:mainACRTStartup QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB /ENTRY:mainACRTStartup
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB
QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB /DLL QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB /DLL
QMAKE_LIBFLAGS = $$QMAKE_LFLAGS_WINDOWS QMAKE_LIBFLAGS = $$QMAKE_LFLAGS_WINDOWS

View File

@ -220,27 +220,27 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{ {
register int expectedValueCopy = expectedValue; register int expectedValueCopy = expectedValue;
return (static_cast<int>(_InterlockedCompareExchange(&_q_value, return (static_cast<int>(_InterlockedCompareExchange(&_q_value,
newValue, newValue,
expectedValueCopy)) expectedValueCopy))
== expectedValue); == expectedValue);
} }
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue) inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
{ {
register int expectedValueCopy = expectedValue; register int expectedValueCopy = expectedValue;
return (static_cast<int>(_InterlockedCompareExchange_acq(reinterpret_cast<volatile uint *>(&_q_value), return (static_cast<int>(_InterlockedCompareExchange_acq(reinterpret_cast<volatile uint *>(&_q_value),
newValue, newValue,
expectedValueCopy)) expectedValueCopy))
== expectedValue); == expectedValue);
} }
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue) inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
{ {
register int expectedValueCopy = expectedValue; register int expectedValueCopy = expectedValue;
return (static_cast<int>(_InterlockedCompareExchange_rel(reinterpret_cast<volatile uint *>(&_q_value), return (static_cast<int>(_InterlockedCompareExchange_rel(reinterpret_cast<volatile uint *>(&_q_value),
newValue, newValue,
expectedValueCopy)) expectedValueCopy))
== expectedValue); == expectedValue);
} }
inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd) inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
@ -287,9 +287,9 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
{ {
register T *expectedValueCopy = expectedValue; register T *expectedValueCopy = expectedValue;
return (_InterlockedCompareExchangePointer(reinterpret_cast<void * volatile*>(&_q_value), return (_InterlockedCompareExchangePointer(reinterpret_cast<void * volatile*>(&_q_value),
newValue, newValue,
expectedValueCopy) expectedValueCopy)
== expectedValue); == expectedValue);
} }
template <typename T> template <typename T>

View File

@ -60,7 +60,7 @@ int main(int argv, char **args)
// do whatever with array // do whatever with array
numReadTotal += numRead; numReadTotal += numRead;
if (numRead == 0 && !socket.waitForReadyRead()) if (numRead == 0 && !socket.waitForReadyRead())
break; break;
} }
//! [0] //! [0]

View File

@ -439,7 +439,7 @@ public:
bool isValid(); bool isValid();
private: private:
QNetworkManagerIp4ConfigPrivate *d; QNetworkManagerIp4ConfigPrivate *d;
}; };
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@ -89,7 +89,7 @@ WriteIncludes::WriteIncludes(Uic *uic)
// for the "Phonon::Someclass" classes, however. // for the "Phonon::Someclass" classes, however.
const QString namespaceDelimiter = QLatin1String("::"); const QString namespaceDelimiter = QLatin1String("::");
const ClassInfoEntry *classLibEnd = qclass_lib_map + sizeof(qclass_lib_map)/sizeof(ClassInfoEntry); const ClassInfoEntry *classLibEnd = qclass_lib_map + sizeof(qclass_lib_map)/sizeof(ClassInfoEntry);
for(const ClassInfoEntry *it = qclass_lib_map; it < classLibEnd; ++it) { for (const ClassInfoEntry *it = qclass_lib_map; it < classLibEnd; ++it) {
const QString klass = QLatin1String(it->klass); const QString klass = QLatin1String(it->klass);
const QString module = QLatin1String(it->module); const QString module = QLatin1String(it->module);
QLatin1String header = QLatin1String(it->header); QLatin1String header = QLatin1String(it->header);

View File

@ -100,7 +100,6 @@ void tst_QtConcurrentFilter::filter()
QCOMPARE(vector, QVector<int>() << 2 << 4); QCOMPARE(vector, QVector<int>() << 2 << 4);
} }
// function // function
{ {
QList<int> list; QList<int> list;
@ -554,7 +553,6 @@ void tst_QtConcurrentFilter::filteredReduced()
int sum = QtConcurrent::filteredReduced<int>(vector, KeepEvenIntegers(), IntSumReduce()); int sum = QtConcurrent::filteredReduced<int>(vector, KeepEvenIntegers(), IntSumReduce());
QCOMPARE(sum, 6); QCOMPARE(sum, 6);
} }
{ {
int sum = QtConcurrent::filteredReduced<int>(list.begin(), int sum = QtConcurrent::filteredReduced<int>(list.begin(),
list.end(), list.end(),
@ -1411,7 +1409,6 @@ void tst_QtConcurrentFilter::resultAt()
QFuture<int> future = QtConcurrent::filtered(ints, filterfn); QFuture<int> future = QtConcurrent::filtered(ints, filterfn);
future.waitForFinished(); future.waitForFinished();
for (int i = 0; i < future.resultCount(); ++i) { for (int i = 0; i < future.resultCount(); ++i) {
QCOMPARE(future.resultAt(i), ints.at(i * 2 + 1)); QCOMPARE(future.resultAt(i), ints.at(i * 2 + 1));
} }

View File

@ -174,28 +174,28 @@ void tst_QPicture::operator_lt_lt()
{ {
// streaming of null pictures // streaming of null pictures
{ {
QPicture pic1, pic2; QPicture pic1, pic2;
QByteArray ba( 100, 0 ); QByteArray ba( 100, 0 );
QDataStream str1( &ba, QIODevice::WriteOnly ); QDataStream str1( &ba, QIODevice::WriteOnly );
str1 << pic1; str1 << pic1;
QDataStream str2( &ba, QIODevice::ReadOnly ); QDataStream str2( &ba, QIODevice::ReadOnly );
str2 >> pic2; str2 >> pic2;
QVERIFY( pic2.isNull() ); QVERIFY( pic2.isNull() );
} }
// picture with a simple line, checking bitwise equality // picture with a simple line, checking bitwise equality
{ {
QPicture pic1, pic2; QPicture pic1, pic2;
QPainter p( &pic1 ); QPainter p( &pic1 );
p.drawLine( 10, 20, 30, 40 ); p.drawLine( 10, 20, 30, 40 );
p.end(); p.end();
QByteArray ba( 10 * pic1.size(), 0 ); QByteArray ba( 10 * pic1.size(), 0 );
QDataStream str1( &ba, QIODevice::WriteOnly ); QDataStream str1( &ba, QIODevice::WriteOnly );
str1 << pic1; str1 << pic1;
QDataStream str2( &ba, QIODevice::ReadOnly ); QDataStream str2( &ba, QIODevice::ReadOnly );
str2 >> pic2; str2 >> pic2;
QCOMPARE( pic1.size(), pic2.size() ); QCOMPARE( pic1.size(), pic2.size() );
QVERIFY( memcmp( pic1.data(), pic2.data(), pic1.size() ) == 0 ); QVERIFY( memcmp( pic1.data(), pic2.data(), pic1.size() ) == 0 );
} }
} }
@ -268,7 +268,6 @@ void tst_QPicture::boundaryValues_data()
QTest::newRow("min x, max y") << INT_MIN << INT_MAX; QTest::newRow("min x, max y") << INT_MIN << INT_MAX;
QTest::newRow("max x, min y") << INT_MAX << INT_MIN; QTest::newRow("max x, min y") << INT_MAX << INT_MIN;
} }
void tst_QPicture::boundaryValues() void tst_QPicture::boundaryValues()
@ -283,8 +282,6 @@ void tst_QPicture::boundaryValues()
painter.drawPoint(QPoint(x, y)); painter.drawPoint(QPoint(x, y));
painter.end(); painter.end();
} }

View File

@ -56,7 +56,7 @@
class tst_QSql : public QObject class tst_QSql : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
tst_QSql(); tst_QSql();
@ -105,7 +105,6 @@ void tst_QSql::cleanup()
{ {
} }
// this is a very basic test for drivers that cannot create/delete tables // this is a very basic test for drivers that cannot create/delete tables
// it can be used while developing new drivers, // it can be used while developing new drivers,
// it's original purpose is to test ODBC Text datasources that are basically // it's original purpose is to test ODBC Text datasources that are basically
@ -120,35 +119,34 @@ void tst_QSql::basicDriverTest()
tst_Databases dbs; tst_Databases dbs;
dbs.open(); dbs.open();
foreach( const QString& dbName, dbs.dbNames ) foreach (const QString& dbName, dbs.dbNames) {
{ QSqlDatabase db = QSqlDatabase::database(dbName);
QSqlDatabase db = QSqlDatabase::database( dbName ); QVERIFY_SQL(db, isValid());
QVERIFY_SQL( db, isValid() );
QStringList tables = db.tables(); QStringList tables = db.tables();
QString tableName; QString tableName;
if ( tables.contains( "qtest_basictest.txt" ) ) if (tables.contains("qtest_basictest.txt"))
tableName = "qtest_basictest.txt"; tableName = "qtest_basictest.txt";
else if ( tables.contains( "qtest_basictest" ) ) else if (tables.contains("qtest_basictest"))
tableName = "qtest_basictest"; tableName = "qtest_basictest";
else if ( tables.contains( "QTEST_BASICTEST" ) ) else if (tables.contains("QTEST_BASICTEST"))
tableName = "QTEST_BASICTEST"; tableName = "QTEST_BASICTEST";
else { else {
QVERIFY( 1 ); QVERIFY(1);
continue; continue;
} }
qDebug("Testing: %s", qPrintable(tst_Databases::dbToString( db ))); qDebug("Testing: %s", qPrintable(tst_Databases::dbToString(db)));
QSqlRecord rInf = db.record( tableName ); QSqlRecord rInf = db.record(tableName);
QCOMPARE( rInf.count(), 2 ); QCOMPARE(rInf.count(), 2);
QCOMPARE( rInf.fieldName( 0 ).toLower(), QString( "id" ) ); QCOMPARE(rInf.fieldName(0).toLower(), QString("id"));
QCOMPARE( rInf.fieldName( 1 ).toLower(), QString( "name" ) ); QCOMPARE(rInf.fieldName(1).toLower(), QString("name"));
} }
dbs.close(); dbs.close();
QVERIFY( 1 ); // make sure the test doesn't fail if no database drivers are there QVERIFY(1); // make sure the test doesn't fail if no database drivers are there
} }
// make sure that the static stuff will be deleted // make sure that the static stuff will be deleted
@ -159,18 +157,18 @@ void tst_QSql::open()
int argc = 1; int argc = 1;
const char *argv[] = {"test"}; const char *argv[] = {"test"};
int count = -1; int count = -1;
for ( i = 0; i < 10; ++i ) { for (i = 0; i < 10; ++i) {
QGuiApplication app(argc, const_cast<char **>(argv), false); QGuiApplication app(argc, const_cast<char **>(argv), false);
tst_Databases dbs; tst_Databases dbs;
dbs.open(); dbs.open();
if ( count == -1 ) if (count == -1)
// first iteration: see how many dbs are open // first iteration: see how many dbs are open
count = (int) dbs.dbNames.count(); count = (int) dbs.dbNames.count();
else else
// next iterations: make sure all are opened again // next iterations: make sure all are opened again
QCOMPARE( count, (int)dbs.dbNames.count() ); QCOMPARE(count, (int)dbs.dbNames.count());
dbs.close(); dbs.close();
} }
} }
@ -191,21 +189,21 @@ void tst_QSql::concurrentAccess()
tst_Databases dbs; tst_Databases dbs;
dbs.open(); dbs.open();
foreach ( const QString& dbName, dbs.dbNames ) { foreach (const QString& dbName, dbs.dbNames) {
QSqlDatabase db = QSqlDatabase::database( dbName ); QSqlDatabase db = QSqlDatabase::database(dbName);
QVERIFY( db.isValid() ); QVERIFY(db.isValid());
if (tst_Databases::isMSAccess(db)) if (tst_Databases::isMSAccess(db))
continue; continue;
QSqlDatabase ndb = QSqlDatabase::addDatabase( db.driverName(), "tst_QSql::concurrentAccess" ); QSqlDatabase ndb = QSqlDatabase::addDatabase(db.driverName(), "tst_QSql::concurrentAccess");
ndb.setDatabaseName( db.databaseName() ); ndb.setDatabaseName(db.databaseName());
ndb.setHostName( db.hostName() ); ndb.setHostName(db.hostName());
ndb.setPort( db.port() ); ndb.setPort(db.port());
ndb.setUserName( db.userName() ); ndb.setUserName(db.userName());
ndb.setPassword( db.password() ); ndb.setPassword(db.password());
QVERIFY_SQL( ndb, open() ); QVERIFY_SQL(ndb, open());
QCOMPARE( db.tables(), ndb.tables() ); QCOMPARE(db.tables(), ndb.tables());
} }
// no database servers installed - don't fail // no database servers installed - don't fail
QVERIFY(1); QVERIFY(1);
@ -222,41 +220,41 @@ void tst_QSql::openErrorRecovery()
dbs.addDbs(); dbs.addDbs();
if (dbs.dbNames.isEmpty()) if (dbs.dbNames.isEmpty())
QSKIP("No database drivers installed"); QSKIP("No database drivers installed");
foreach ( const QString& dbName, dbs.dbNames ) { foreach (const QString& dbName, dbs.dbNames) {
QSqlDatabase db = QSqlDatabase::database( dbName, false ); QSqlDatabase db = QSqlDatabase::database(dbName, false);
CHECK_DATABASE( db ); CHECK_DATABASE(db);
QString userName = db.userName(); QString userName = db.userName();
QString password = db.password(); QString password = db.password();
// force an open error // force an open error
if ( db.open( "dummy130977", "doesnt_exist" ) ) { if (db.open("dummy130977", "doesnt_exist")) {
qDebug("Promiscuous database server without access control - test skipped for %s", qDebug("Promiscuous database server without access control - test skipped for %s",
qPrintable(tst_Databases::dbToString( db )) ); qPrintable(tst_Databases::dbToString(db)));
QVERIFY(1); QVERIFY(1);
continue; continue;
} }
QFAIL_SQL( db, isOpen() ); QFAIL_SQL(db, isOpen());
QVERIFY_SQL( db, isOpenError() ); QVERIFY_SQL(db, isOpenError());
// now open it // now open it
if ( !db.open( userName, password ) ) { if (!db.open(userName, password)) {
qDebug() << "Could not open Database " << tst_Databases::dbToString( db ) << qDebug() << "Could not open Database " << tst_Databases::dbToString(db) <<
". Assuming DB is down, skipping... (Error: " << ". Assuming DB is down, skipping... (Error: " <<
tst_Databases::printError( db.lastError() ) << ")"; tst_Databases::printError(db.lastError()) << ")";
continue; continue;
} }
QVERIFY_SQL( db, open( userName, password ) ); QVERIFY_SQL(db, open(userName, password));
QVERIFY_SQL( db, isOpen() ); QVERIFY_SQL(db, isOpen());
QFAIL_SQL( db, isOpenError() ); QFAIL_SQL(db, isOpenError());
db.close(); db.close();
QFAIL_SQL( db, isOpen() ); QFAIL_SQL(db, isOpen());
// force another open error // force another open error
QFAIL_SQL( db, open( "dummy130977", "doesnt_exist" ) ); QFAIL_SQL(db, open("dummy130977", "doesnt_exist"));
QFAIL_SQL( db, isOpen() ); QFAIL_SQL(db, isOpen());
QVERIFY_SQL( db, isOpenError() ); QVERIFY_SQL(db, isOpenError());
} }
} }
@ -266,13 +264,13 @@ void tst_QSql::registerSqlDriver()
const char *argv[] = {"test"}; const char *argv[] = {"test"};
QGuiApplication app(argc, const_cast<char **>(argv), false); QGuiApplication app(argc, const_cast<char **>(argv), false);
QSqlDatabase::registerSqlDriver( "QSQLTESTDRIVER", new QSqlDriverCreator<QSqlNullDriver> ); QSqlDatabase::registerSqlDriver("QSQLTESTDRIVER", new QSqlDriverCreator<QSqlNullDriver>);
QVERIFY( QSqlDatabase::drivers().contains( "QSQLTESTDRIVER" ) ); QVERIFY(QSqlDatabase::drivers().contains("QSQLTESTDRIVER"));
QSqlDatabase db = QSqlDatabase::addDatabase( "QSQLTESTDRIVER" ); QSqlDatabase db = QSqlDatabase::addDatabase("QSQLTESTDRIVER");
QVERIFY( db.isValid() ); QVERIFY(db.isValid());
QCOMPARE( db.tables(), QStringList() ); QCOMPARE(db.tables(), QStringList());
} }
QTEST_APPLESS_MAIN(tst_QSql) QTEST_APPLESS_MAIN(tst_QSql)

View File

@ -43,20 +43,24 @@
#include <QObject> #include <QObject>
class GadgetWithNoEnums { class GadgetWithNoEnums
{
Q_GADGET Q_GADGET
public:
GadgetWithNoEnums() {} public:
virtual ~GadgetWithNoEnums() {} GadgetWithNoEnums() {}
virtual ~GadgetWithNoEnums() {}
}; };
class DerivedGadgetWithEnums : public GadgetWithNoEnums { class DerivedGadgetWithEnums : public GadgetWithNoEnums
{
Q_GADGET Q_GADGET
Q_ENUMS( FooEnum ) Q_ENUMS( FooEnum )
public:
enum FooEnum { FooValue }; public:
DerivedGadgetWithEnums() {} enum FooEnum { FooValue };
~DerivedGadgetWithEnums() {} DerivedGadgetWithEnums() {}
~DerivedGadgetWithEnums() {}
}; };
#endif #endif

View File

@ -45,8 +45,10 @@
#include <QObject> #include <QObject>
class InlineSlotsWithThrowDeclaration : public QObject { class InlineSlotsWithThrowDeclaration : public QObject
{
Q_OBJECT Q_OBJECT
public slots: public slots:
void a() throw() { } void a() throw() { }
void b() const throw() { } void b() const throw() { }

View File

@ -40,14 +40,15 @@
****************************************************************************/ ****************************************************************************/
#include <QApplication> #include <QApplication>
#include <stdio.h> #include <stdio.h>
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
QApplication app(argc, argv); QApplication app(argc, argv);
if (argc > 1) if (argc > 1)
fprintf(stderr, "%s", argv[1]); fprintf(stderr, "%s", argv[1]);
else else
fprintf(stderr, "Failed"); fprintf(stderr, "Failed");
fflush(stderr); fflush(stderr);
return 0; return 0;
} }

View File

@ -64,7 +64,7 @@ AbstractItemView::~AbstractItemView()
/*virtual*/ /*virtual*/
void AbstractItemView::setModel(QAbstractItemModel *model, AbstractViewItem *prototype) void AbstractItemView::setModel(QAbstractItemModel *model, AbstractViewItem *prototype)
{ {
if( m_model == model || !model) if (m_model == model || !model)
return; return;
if (m_model) { if (m_model) {
@ -236,7 +236,7 @@ void AbstractItemView::currentIndexChanged(const QModelIndex &current, const QMo
/*virtual*/ /*virtual*/
void AbstractItemView::currentSelectionChanged(const QItemSelection &selected, void AbstractItemView::currentSelectionChanged(const QItemSelection &selected,
const QItemSelection &deselected) const QItemSelection &deselected)
{ {
Q_UNUSED(selected) Q_UNUSED(selected)
Q_UNUSED(deselected) Q_UNUSED(deselected)
@ -260,7 +260,6 @@ void AbstractItemView::rowsAboutToBeInserted(const QModelIndex &index, int start
// TODO implement // TODO implement
} }
/*virtual*/ /*virtual*/
void AbstractItemView::rowsAboutToBeRemoved(const QModelIndex &index,int start, int end) void AbstractItemView::rowsAboutToBeRemoved(const QModelIndex &index,int start, int end)
{ {
@ -346,7 +345,7 @@ bool AbstractItemView::event(QEvent *e)
m_container->resize(this->size().width()-verticalScrollBar()->size().width(), m_container->resize(this->size().width()-verticalScrollBar()->size().width(),
m_container->preferredHeight()); m_container->preferredHeight());
if(verticalScrollBar()->sliderPosition() > verticalScrollBar()->sliderSize()) if (verticalScrollBar()->sliderPosition() > verticalScrollBar()->sliderSize())
verticalScrollBar()->setSliderPosition(verticalScrollBar()->sliderSize()); verticalScrollBar()->setSliderPosition(verticalScrollBar()->sliderSize());
result = true; result = true;
@ -394,10 +393,9 @@ void AbstractItemView::scrollContentsBy(qreal dx, qreal dy)
qreal itemH = 1; qreal itemH = 1;
AbstractViewItem *item = m_container->itemAt(0); AbstractViewItem *item = m_container->itemAt(0);
if(item && item->size().height() > 1) { if (item && item->size().height() > 1) {
itemH = item->size().height(); itemH = item->size().height();
} } else if (item && item->preferredHeight() > 1) {
else if(item && item->preferredHeight() > 1) {
itemH = item->preferredHeight(); itemH = item->preferredHeight();
} }
@ -407,8 +405,7 @@ void AbstractItemView::scrollContentsBy(qreal dx, qreal dy)
if ((vpy+m_container->size().height()-dy > pos().y()+size().height()) && if ((vpy+m_container->size().height()-dy > pos().y()+size().height()) &&
(qAbs(dy) < itemH) && (vpy-dy <= 0)) { (qAbs(dy) < itemH) && (vpy-dy <= 0)) {
m_container->setPos(vpx, vpy-dy); m_container->setPos(vpx, vpy-dy);
} } else {
else {
qreal vPos = verticalScrollBar()->sliderPosition(); qreal vPos = verticalScrollBar()->sliderPosition();
int startRow = m_model->index(vPos/itemH, 0).row(); int startRow = m_model->index(vPos/itemH, 0).row();
int itemsInContainer = m_container->itemCount(); int itemsInContainer = m_container->itemCount();

View File

@ -59,7 +59,6 @@ BackgroundItem::BackgroundItem(const QString &filename, QGraphicsWidget *parent)
BackgroundItem::~BackgroundItem() BackgroundItem::~BackgroundItem()
{ {
} }
void BackgroundItem::resizeEvent(QGraphicsSceneResizeEvent *event) void BackgroundItem::resizeEvent(QGraphicsSceneResizeEvent *event)

View File

@ -74,7 +74,6 @@ DummyDataGenerator::DummyDataGenerator() : m_isMale(false)
DummyDataGenerator::~DummyDataGenerator() DummyDataGenerator::~DummyDataGenerator()
{ {
} }
void DummyDataGenerator::Reset() void DummyDataGenerator::Reset()
@ -117,10 +116,10 @@ QString DummyDataGenerator::randomIconItem()
if (qrand()%4) { if (qrand()%4) {
int randVal = 1+qrand()%25; int randVal = 1+qrand()%25;
if(m_isMale && randVal > 15) { if (m_isMale && randVal > 15) {
randVal -= 15; randVal -= 15;
} }
if(!m_isMale && randVal <= 10) { if (!m_isMale && randVal <= 10) {
randVal += 10; randVal += 10;
} }
@ -131,8 +130,7 @@ QString DummyDataGenerator::randomIconItem()
QString DummyDataGenerator::randomStatusItem() QString DummyDataGenerator::randomStatusItem()
{ {
switch ( qrand()%3 ) switch (qrand()%3) {
{
case 0: return Theme::p()->pixmapPath() + "contact_status_online.svg"; case 0: return Theme::p()->pixmapPath() + "contact_status_online.svg";
case 1: return Theme::p()->pixmapPath() + "contact_status_offline.svg"; case 1: return Theme::p()->pixmapPath() + "contact_status_offline.svg";
case 2: return Theme::p()->pixmapPath() + "contact_status_idle.svg"; case 2: return Theme::p()->pixmapPath() + "contact_status_idle.svg";

View File

@ -43,7 +43,7 @@
#include "label.h" #include "label.h"
Label::Label(const QString& text, QGraphicsItem *parent) Label::Label(const QString &text, QGraphicsItem *parent)
: GvbWidget(parent) : GvbWidget(parent)
{ {
m_textItem = new QGraphicsSimpleTextItem(this); m_textItem = new QGraphicsSimpleTextItem(this);
@ -58,7 +58,7 @@ Label::~Label()
{ {
} }
void Label::setText(const QString& text) void Label::setText(const QString &text)
{ {
m_textItem->setText(text); m_textItem->setText(text);
prepareGeometryChange(); prepareGeometryChange();
@ -81,15 +81,13 @@ void Label::resizeEvent(QGraphicsSceneResizeEvent *event)
QSizeF Label::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const QSizeF Label::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
{ {
switch (which) switch (which) {
{
case Qt::MinimumSize: case Qt::MinimumSize:
// fall thru // fall thru
case Qt::PreferredSize: case Qt::PreferredSize: {
{
QFontMetricsF fm(m_textItem->font()); QFontMetricsF fm(m_textItem->font());
return QSizeF(fm.width(m_textItem->text()), fm.height()); return QSizeF(fm.width(m_textItem->text()), fm.height());
} }
default: default:
return GvbWidget::sizeHint(which, constraint); return GvbWidget::sizeHint(which, constraint);
} }

View File

@ -64,16 +64,16 @@ struct ItemData
Q_DECLARE_METATYPE(ItemData); Q_DECLARE_METATYPE(ItemData);
ListItem::ListItem(QGraphicsWidget *parent) ListItem::ListItem(QGraphicsWidget *parent)
: GvbWidget(parent), : GvbWidget(parent)
m_txtlayout(new QGraphicsGridLayout()), , m_txtlayout(new QGraphicsGridLayout())
m_layout(new QGraphicsLinearLayout(Qt::Horizontal)), , m_layout(new QGraphicsLinearLayout(Qt::Horizontal))
m_liconlayout(new QGraphicsLinearLayout(Qt::Horizontal)), , m_liconlayout(new QGraphicsLinearLayout(Qt::Horizontal))
m_riconlayout(new QGraphicsLinearLayout(Qt::Horizontal)) , m_riconlayout(new QGraphicsLinearLayout(Qt::Horizontal))
,m_fonts() , m_fonts()
,m_borderPen(Qt::NoPen) , m_borderPen(Qt::NoPen)
,m_backgroundBrush(QBrush()) , m_backgroundBrush(QBrush())
,m_backgroundOpacity(1.0) , m_backgroundOpacity(1.0)
,m_rounding(0.0, 0.0) , m_rounding(0.0, 0.0)
{ {
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
setContentsMargins(0,4,4,0); setContentsMargins(0,4,4,0);
@ -97,39 +97,36 @@ ListItem::ListItem(QGraphicsWidget *parent)
ListItem::~ListItem() ListItem::~ListItem()
{ {
if ( !m_liconlayout->parentLayoutItem() ) if (!m_liconlayout->parentLayoutItem())
delete m_liconlayout; delete m_liconlayout;
if ( !m_riconlayout->parentLayoutItem() ) if (!m_riconlayout->parentLayoutItem())
delete m_riconlayout; delete m_riconlayout;
} }
void ListItem::setIcon( IconItem *iconItem, const IconItemPos iconPos ) void ListItem::setIcon(IconItem *iconItem, const IconItemPos iconPos)
{ {
if (iconPos == LeftIcon) { if (iconPos == LeftIcon) {
if (m_liconlayout->count() > 0 && m_liconlayout->itemAt(0)) { if (m_liconlayout->count() > 0 && m_liconlayout->itemAt(0)) {
delete m_liconlayout->itemAt(0); delete m_liconlayout->itemAt(0);
m_liconlayout->addItem( iconItem ); m_liconlayout->addItem(iconItem);
} else {
m_liconlayout->addItem(iconItem);
} }
else { m_liconlayout->itemAt(0)->setMaximumSize(58, 58);
m_liconlayout->addItem( iconItem ); } else if (iconPos == RightIcon) {
}
m_liconlayout->itemAt(0)->setMaximumSize(58,58);
}
else if (iconPos == RightIcon) {
if (m_riconlayout->count() > 0 && m_riconlayout->itemAt(0)) { if (m_riconlayout->count() > 0 && m_riconlayout->itemAt(0)) {
delete m_riconlayout->itemAt(0); delete m_riconlayout->itemAt(0);
m_riconlayout->addItem( iconItem ); m_riconlayout->addItem(iconItem);
} else {
m_riconlayout->addItem(iconItem);
} }
else { m_riconlayout->itemAt(0)->setMaximumSize(22, 22);
m_riconlayout->addItem( iconItem );
}
m_riconlayout->itemAt(0)->setMaximumSize(22,22);
} }
m_layout->invalidate(); m_layout->invalidate();
} }
IconItem* ListItem::icon( const IconItemPos iconPos ) const IconItem* ListItem::icon(const IconItemPos iconPos) const
{ {
QGraphicsLayoutItem* item = 0; QGraphicsLayoutItem* item = 0;
@ -203,13 +200,13 @@ void ListItem::setData(const QVariant &value, int role)
ItemData data = value.value<ItemData>(); ItemData data = value.value<ItemData>();
QList<ListItem::TextPos> textkeys = data.texts.keys(); QList<ListItem::TextPos> textkeys = data.texts.keys();
for( int i = 0; i<textkeys.count(); ++i) { for (int i = 0; i<textkeys.count(); ++i) {
setText(data.texts[textkeys.at(i)],textkeys.at(i)); setText(data.texts[textkeys.at(i)], textkeys.at(i));
setFont(data.fonts[textkeys.at(i)], textkeys.at(i)); setFont(data.fonts[textkeys.at(i)], textkeys.at(i));
} }
QList<ListItem::IconItemPos> iconkeys = data.icons.keys(); QList<ListItem::IconItemPos> iconkeys = data.icons.keys();
for( int i = 0; i<iconkeys.count(); ++i) { for (int i = 0; i<iconkeys.count(); ++i) {
IconItem *iconItem = icon(iconkeys.at(i)); IconItem *iconItem = icon(iconkeys.at(i));
if (iconItem) if (iconItem)
iconItem->setFileName(data.icons[iconkeys.at(i)]); iconItem->setFileName(data.icons[iconkeys.at(i)]);
@ -249,8 +246,7 @@ void ListItem::setText(const QString str, const TextPos position)
m_txtlayout->addItem(label, position, 0); m_txtlayout->addItem(label, position, 0);
if (m_fonts.contains(position)) if (m_fonts.contains(position))
label->setFont(m_fonts[position]); label->setFont(m_fonts[position]);
} } else {
else {
Label *titem = static_cast<Label *>(item); Label *titem = static_cast<Label *>(item);
titem->setText(str); titem->setText(str);
} }
@ -290,14 +286,12 @@ void ListItem::paint(QPainter *painter, const QStyleOptionGraphicsItem */*option
QRectF r = rect(); QRectF r = rect();
r.adjust(penWidth, penWidth, -penWidth, -penWidth); r.adjust(penWidth, penWidth, -penWidth, -penWidth);
if (m_borderPen != Qt::NoPen) if (m_borderPen != Qt::NoPen) {
{
painter->setPen(m_borderPen); painter->setPen(m_borderPen);
painter->drawRoundedRect(r, m_rounding.width(), m_rounding.height()); painter->drawRoundedRect(r, m_rounding.width(), m_rounding.height());
} }
if (m_backgroundBrush != Qt::NoBrush) if (m_backgroundBrush != Qt::NoBrush) {
{
painter->setPen(Qt::NoPen); painter->setPen(Qt::NoPen);
painter->setBrush(m_backgroundBrush); painter->setBrush(m_backgroundBrush);
painter->setOpacity(m_backgroundOpacity); painter->setOpacity(m_backgroundOpacity);

View File

@ -215,7 +215,7 @@ QRectF TopBar::boundingRect() const
QHash<QString, QSize>sizes = (Theme::p()->theme() == Theme::Blue) ? QHash<QString, QSize>sizes = (Theme::p()->theme() == Theme::Blue) ?
m_sizesBlue : m_sizesLime; m_sizesBlue : m_sizesLime;
if(!m_topBarPixmap.isNull()) if (!m_topBarPixmap.isNull())
return QRectF(0, 0, m_topBarPixmap.size().width(), m_topBarPixmap.size().height()); return QRectF(0, 0, m_topBarPixmap.size().width(), m_topBarPixmap.size().height());
else else
return QRectF(0, 0, sizes["topbar.svg"].width(), sizes["topbar.svg"].height()); return QRectF(0, 0, sizes["topbar.svg"].width(), sizes["topbar.svg"].height());

View File

@ -72,8 +72,10 @@ public:
void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0 ); void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0 );
QRectF boundingRect() const; QRectF boundingRect() const;
void resizeEvent(QGraphicsSceneResizeEvent *event); void resizeEvent(QGraphicsSceneResizeEvent *event);
inline QPoint getStatusBarLocation() { return m_topBarStatusBarMiddlePoint + inline QPoint getStatusBarLocation()
m_topBarStatusBarMiddle.rect().bottomLeft(); } {
return m_topBarStatusBarMiddlePoint + m_topBarStatusBarMiddle.rect().bottomLeft();
}
public slots: public slots:
void themeChange(); void themeChange();
@ -89,7 +91,6 @@ private:
const QSizeF &constraint = QSizeF()) const; const QSizeF &constraint = QSizeF()) const;
void setDefaultSizes(); void setDefaultSizes();
private: private:
Q_DISABLE_COPY(TopBar) Q_DISABLE_COPY(TopBar)

View File

@ -86,7 +86,6 @@ void WebViewPrivate::adjustSize()
else else
q->horizontalScrollBar()->setSliderSize(0.0); q->horizontalScrollBar()->setSliderSize(0.0);
if (h > q->viewport()->boundingRect().height()) if (h > q->viewport()->boundingRect().height())
q->verticalScrollBar()->setSliderSize(h); q->verticalScrollBar()->setSliderSize(h);
else else
@ -131,7 +130,6 @@ void WebViewPrivate::_q_motionEnded()
WebViewCache::WebViewCache(QGraphicsWebView *webView) WebViewCache::WebViewCache(QGraphicsWebView *webView)
: m_webView(webView) : m_webView(webView)
{ {
} }
WebViewCache::~WebViewCache() WebViewCache::~WebViewCache()

View File

@ -42,7 +42,6 @@
#include <QtWidgets> #include <QtWidgets>
#include "../shared/shared.h" #include "../shared/shared.h"
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
QApplication app(argc, argv); QApplication app(argc, argv);
@ -58,7 +57,6 @@ int main(int argc, char **argv)
scrollView.resize(600, 400); scrollView.resize(600, 400);
scrollView.show(); scrollView.show();
return app.exec(); return app.exec();
} }

View File

@ -45,7 +45,7 @@
class CellWidget : public QWidget class CellWidget : public QWidget
{ {
public: public:
CellWidget (QWidget *parent = 0) : QWidget(parent) { } CellWidget(QWidget *parent = 0) : QWidget(parent) {}
void paintEvent(QPaintEvent * event) void paintEvent(QPaintEvent * event)
{ {
static int value = 200; static int value = 200;
@ -70,7 +70,6 @@ int main(int argc, char **argv)
tableWidget.resize(400, 600); tableWidget.resize(400, 600);
tableWidget.show(); tableWidget.show();
return app.exec(); return app.exec();
} }

View File

@ -45,11 +45,12 @@
class MyWidget : public QWidget class MyWidget : public QWidget
{ {
public: public:
MyWidget() : QWidget() { MyWidget() : QWidget()
{
setAttribute(Qt::WA_OpaquePaintEvent); setAttribute(Qt::WA_OpaquePaintEvent);
setAttribute(Qt::WA_StaticContents); } setAttribute(Qt::WA_StaticContents);
}
protected: protected:
void paintEvent(QPaintEvent *e) { qDebug() << e->rect(); } void paintEvent(QPaintEvent *e) { qDebug() << e->rect(); }
}; };

View File

@ -288,7 +288,6 @@ DFA NFA::toDFA() const
if (transition.key() == Epsilon && epsilonStates.contains(transition.value())) if (transition.key() == Epsilon && epsilonStates.contains(transition.value()))
epsilonStates.insert(i, epsilonStates.value(transition.value())); epsilonStates.insert(i, epsilonStates.value(transition.value()));
} }
} while (lastCount != epsilonStates.count()); } while (lastCount != epsilonStates.count());
for (int i = 0; i < states.count(); ++i) { for (int i = 0; i < states.count(); ++i) {
@ -313,7 +312,6 @@ DFA NFA::toDFA() const
*/ */
} }
QSet<InputType> validInput; QSet<InputType> validInput;
foreach (const State &s, states) foreach (const State &s, states)
for (TransitionMap::ConstIterator it = s.transitions.constBegin(), for (TransitionMap::ConstIterator it = s.transitions.constBegin(),
@ -504,5 +502,3 @@ DFA DFA::minimize() const
return *this; return *this;
} }