{
public:
inline ResultReporter(ThreadEngine<void> *) { }
- inline void reserveSpace(int) { };
- inline void reportResults(int) { };
+ inline void reserveSpace(int) { }
+ inline void reportResults(int) { }
inline void * getPointer() { return 0; }
};
ResultIteratorBase resultAt(int index) const;
bool contains(int index) const;
int count() const;
- virtual ~ResultStoreBase() { };
+ virtual ~ResultStoreBase() { }
protected:
int insertResultItem(int index, ResultItem &resultItem);
template <typename T>
class QForeachContainer : public QForeachContainerBase {
public:
- inline QForeachContainer(const T& t): c(t), brk(0), i(c.begin()), e(c.end()){};
+ inline QForeachContainer(const T& t): c(t), brk(0), i(c.begin()), e(c.end()){}
const T c;
mutable int brk;
mutable typename T::const_iterator i, e;
QPixmap QDragManager::dragCursor(Qt::DropAction action) const
{
- QDragPrivate * d = dragPrivate();
- if (d && d->customCursors.contains(action))
- return d->customCursors[action];
+ typedef QMap<Qt::DropAction, QPixmap>::const_iterator Iterator;
+
+ if (const QDragPrivate *d = dragPrivate()) {
+ const Iterator it = d->customCursors.constFind(action);
+ if (it != d->customCursors.constEnd())
+ return it.value();
+ }
Qt::CursorShape shape = Qt::ForbiddenCursor;
switch (action) {
default:
shape = Qt::ForbiddenCursor;
}
-
- return QGuiApplicationPrivate::instance()->getPixmapCursor(Qt::DragMoveCursor);
+ return QGuiApplicationPrivate::instance()->getPixmapCursor(shape);
}
Qt::DropAction QDragManager::defaultAction(Qt::DropActions possibleActions,
virtual QMimeData *platformDropData() = 0;
- virtual void startDrag() {};
+ virtual void startDrag() {}
virtual void move(const QMouseEvent *me) = 0;
virtual void drop(const QMouseEvent *me) = 0;
virtual void cancel() = 0;
m_dash_stroker.setMiterLimit(pen.miterLimit());
m_dash_stroker.setClipRect(clip);
- float curvynessAdd, curvynessMul, roundness = 0;
+ float curvynessAdd, curvynessMul;
- // simplfy pens that are thin in device size (2px wide or less)
+ // simplify pens that are thin in device size (2px wide or less)
if (width < 2.5 && (cosmetic || m_inv_scale == 1)) {
curvynessAdd = 0.5;
curvynessMul = CURVE_FLATNESS / m_inv_scale;
- roundness = 1;
} else if (cosmetic) {
curvynessAdd= width / 2;
curvynessMul= CURVE_FLATNESS;
- roundness = qMax<int>(4, width * CURVE_FLATNESS);
} else {
curvynessAdd = width * m_inv_scale;
curvynessMul = CURVE_FLATNESS / m_inv_scale;
- roundness = qMax<int>(4, width * curvynessMul);
}
if (count < 2)
Q_ASSERT(type == path.elements() || *type == QPainterPath::MoveToElement);
QPointF p = QPointF(points[0], points[1]) * state->matrix;
- QPointF movedTo = p;
patternOffset = state->lastPen.dashOffset()*64;
lastPixel.x = -1;
case QTextCharFormat::AlignSubScript: value = QString::fromLatin1("sub"); break;
case QTextCharFormat::AlignTop: value = QString::fromLatin1("100%"); break;
case QTextCharFormat::AlignBottom : value = QString::fromLatin1("-100%"); break;
+ case QTextCharFormat::AlignBaseline: break;
}
writer.writeAttribute(styleNS, QString::fromLatin1("text-position"), value);
}
m_dash_stroker.setMiterLimit(pen.miterLimit());
m_dash_stroker.setClipRect(clip);
- float curvynessAdd, curvynessMul, roundness = 0;
+ float curvynessAdd, curvynessMul;
// simplfy pens that are thin in device size (2px wide or less)
if (width < 2.5 && (cosmetic || m_inv_scale == 1)) {
curvynessAdd = 0.5;
curvynessMul = CURVE_FLATNESS / m_inv_scale;
- roundness = 1;
} else if (cosmetic) {
curvynessAdd= width / 2;
curvynessMul= CURVE_FLATNESS;
- roundness = qMax<int>(4, width * CURVE_FLATNESS);
} else {
curvynessAdd = width * m_inv_scale;
curvynessMul = CURVE_FLATNESS / m_inv_scale;
- roundness = qMax<int>(4, width * curvynessMul);
}
if (count < 2)
QDBusReply<QString> reply = this->call(QLatin1String("SendMessage"),
QVariant::fromValue(to),
QVariant::fromValue(message));
- bool ok = true;
- if(reply.error().type() == QDBusError::InvalidArgs) {
- qWarning() << reply.error().message();
- ok = false;
- }
+ if (reply.error().type() == QDBusError::InvalidArgs)
+ qWarning("%s", qPrintable(reply.error().message()));
}
QT_END_NAMESPACE
QString qColName = QString::fromUtf8((const char *)colName.constData());
#endif
// nullable can be SQL_NO_NULLS, SQL_NULLABLE or SQL_NULLABLE_UNKNOWN
- int required = -1;
- if (nullable == SQL_NO_NULLS) {
- required = 1;
- } else if (nullable == SQL_NULLABLE) {
- required = 0;
- }
QVariant::Type type = qDecodeODBCType(colType, p, unsignedFlag == SQL_FALSE);
QSqlField f(qColName, type);
f.setSqlType(colType);
class QBenchmarkMeasurerBase
{
public:
- virtual ~QBenchmarkMeasurerBase(){};
- virtual void init() {};
+ virtual ~QBenchmarkMeasurerBase() {}
+ virtual void init() {}
virtual void start() = 0;
virtual qint64 checkpoint() = 0;
virtual qint64 stop() = 0;
const QString pageDefaultString = QLatin1String("Page");
- int id = -1;
- if (const DomProperty *pid = attributes.value(QLatin1String("id"))) {
- id = pid->elementNumber();
- }
-
if (m_uic->customWidgetsInfo()->extends(parentClass, QLatin1String("QMainWindow"))) {
if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QMenuBar"))) {
m_output << m_indent << parentWidget << "->setMenuBar(" << varName <<");\n";
explicit QGuiPlatformPlugin(QObject *parent = 0);
~QGuiPlatformPlugin();
- virtual QStringList keys() const { return QStringList() << QLatin1String("default"); };
+ virtual QStringList keys() const { return QStringList(QStringLiteral("default")); }
virtual QString styleName();
virtual QPalette palette();
// We mean it.
//
+#include <private/qobject_p.h>
+
QT_BEGIN_HEADER
#ifndef QT_NO_SOFTKEYMANAGER
Q_DECLARE_PUBLIC(QSoftKeyManager)
public:
- virtual void updateSoftKeys_sys() {};
+ virtual void updateSoftKeys_sys() {}
protected:
static QSoftKeyManager *self;