summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/dialogs/qfiledialog_p.h3
-rw-r--r--src/gui/dialogs/qinputdialog.cpp2
-rw-r--r--src/gui/image/qimage.cpp5
-rw-r--r--src/gui/kernel/qapplication.cpp6
-rw-r--r--src/gui/kernel/qapplication_x11.cpp8
-rw-r--r--src/gui/kernel/qclipboard_x11.cpp14
-rw-r--r--src/gui/kernel/qwidget.cpp4
-rw-r--r--src/gui/painting/qpaintengine_mac.cpp20
-rw-r--r--src/gui/painting/qpaintengine_x11_p.h1
-rw-r--r--src/gui/styles/qcommonstyle.cpp2
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp36
11 files changed, 59 insertions, 42 deletions
diff --git a/src/gui/dialogs/qfiledialog_p.h b/src/gui/dialogs/qfiledialog_p.h
index ab4199e2d5..a393ec7061 100644
--- a/src/gui/dialogs/qfiledialog_p.h
+++ b/src/gui/dialogs/qfiledialog_p.h
@@ -275,7 +275,10 @@ public:
// data
QStringList watching;
QFileSystemModel *model;
+
+#ifndef QT_NO_COMPLETER
QFSCompletor *completer;
+#endif //QT_NO_COMPLETER
QFileDialog::FileMode fileMode;
QFileDialog::AcceptMode acceptMode;
diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp
index 30f31513f0..289459c54c 100644
--- a/src/gui/dialogs/qinputdialog.cpp
+++ b/src/gui/dialogs/qinputdialog.cpp
@@ -1249,9 +1249,9 @@ double QInputDialog::getDouble(QWidget *parent, const QString &title, const QStr
QInputDialog dialog(parent, flags);
dialog.setWindowTitle(title);
dialog.setLabelText(label);
+ dialog.setDoubleDecimals(decimals);
dialog.setDoubleRange(min, max);
dialog.setDoubleValue(value);
- dialog.setDoubleDecimals(decimals);
int ret = dialog.exec();
if (ok)
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 0377ca7e39..75538a8717 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -4281,6 +4281,11 @@ QImage QImage::mirrored(bool horizontal, bool vertical) const
int h = d->height;
// Create result image, copy colormap
QImage result(d->width, d->height, d->format);
+
+ // check if we ran out of of memory..
+ if (!result.d)
+ return QImage();
+
result.d->colortable = d->colortable;
result.d->has_alpha_clut = d->has_alpha_clut;
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index cbb1f45666..4ab653df41 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -3565,10 +3565,12 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
#if !defined(QT_NO_WHEELEVENT) || !defined(QT_NO_TABLETEVENT)
else if (
# ifndef QT_NO_WHEELEVENT
- e->type() == QEvent::Wheel ||
+ e->type() == QEvent::Wheel
+# else
+ false
# endif
# ifndef QT_NO_TABLETEVENT
- e->type() == QEvent::TabletMove
+ || e->type() == QEvent::TabletMove
|| e->type() == QEvent::TabletPress
|| e->type() == QEvent::TabletRelease
# endif
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index 8ebea19d50..720f5c371c 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -2103,14 +2103,6 @@ void qt_init(QApplicationPrivate *priv, int,
X11->xfixes_major = major;
}
}
- if (X11->use_xfixes && X11->ptrXFixesSelectSelectionInput) {
- const unsigned long eventMask =
- XFixesSetSelectionOwnerNotifyMask | XFixesSelectionWindowDestroyNotifyMask | XFixesSelectionClientCloseNotifyMask;
- X11->ptrXFixesSelectSelectionInput(X11->display, QX11Info::appRootWindow(0),
- XA_PRIMARY, eventMask);
- X11->ptrXFixesSelectSelectionInput(X11->display, QX11Info::appRootWindow(0),
- ATOM(CLIPBOARD), eventMask);
- }
#endif // QT_NO_XFIXES
#ifndef QT_NO_XCURSOR
diff --git a/src/gui/kernel/qclipboard_x11.cpp b/src/gui/kernel/qclipboard_x11.cpp
index d7eb111bd6..b85e024a44 100644
--- a/src/gui/kernel/qclipboard_x11.cpp
+++ b/src/gui/kernel/qclipboard_x11.cpp
@@ -428,6 +428,20 @@ QClipboard::QClipboard(QObject *parent)
// XFixesSelectionNotify events when someone changes the
// clipboard.
(void)QApplication::desktop();
+
+#ifndef QT_NO_XFIXES
+ if (X11->use_xfixes && X11->ptrXFixesSelectSelectionInput) {
+ const unsigned long eventMask =
+ XFixesSetSelectionOwnerNotifyMask | XFixesSelectionWindowDestroyNotifyMask | XFixesSelectionClientCloseNotifyMask;
+ for (int i = 0; i < X11->screenCount; ++i) {
+ X11->ptrXFixesSelectSelectionInput(X11->display, QX11Info::appRootWindow(i),
+ XA_PRIMARY, eventMask);
+ X11->ptrXFixesSelectSelectionInput(X11->display, QX11Info::appRootWindow(i),
+ ATOM(CLIPBOARD), eventMask);
+ }
+ }
+#endif // QT_NO_XFIXES
+
if (X11->time == CurrentTime) {
// send a dummy event to myself to get the timestamp from X11.
qt_init_timestamp_data data;
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index d5fdd93f3c..db73c073e8 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -5635,8 +5635,8 @@ bool QWidget::hasFocus() const
called from focusOutEvent() or focusInEvent(), you may get an
infinite recursion.
- \sa hasFocus(), clearFocus(), focusInEvent(), focusOutEvent(),
- setFocusPolicy(), QApplication::focusWidget(), grabKeyboard(),
+ \sa focus(), hasFocus(), clearFocus(), focusInEvent(), focusOutEvent(),
+ setFocusPolicy(), focusWidget(), QApplication::focusWidget(), grabKeyboard(),
grabMouse(), {Keyboard Focus}
*/
diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp
index 3d0a1b765f..854bbaf7be 100644
--- a/src/gui/painting/qpaintengine_mac.cpp
+++ b/src/gui/painting/qpaintengine_mac.cpp
@@ -1496,23 +1496,23 @@ QCoreGraphicsPaintEnginePrivate::setStrokePen(const QPen &pen)
for(int i = 0; i < customs.size(); ++i)
linedashes.append(customs.at(i));
} else if(pen.style() == Qt::DashLine) {
- linedashes.append(3);
- linedashes.append(1);
+ linedashes.append(4);
+ linedashes.append(2);
} else if(pen.style() == Qt::DotLine) {
linedashes.append(1);
- linedashes.append(1);
+ linedashes.append(2);
} else if(pen.style() == Qt::DashDotLine) {
- linedashes.append(3);
- linedashes.append(1);
- linedashes.append(1);
+ linedashes.append(4);
+ linedashes.append(2);
linedashes.append(1);
+ linedashes.append(2);
} else if(pen.style() == Qt::DashDotDotLine) {
- linedashes.append(3);
- linedashes.append(1);
- linedashes.append(1);
- linedashes.append(1);
+ linedashes.append(4);
+ linedashes.append(2);
linedashes.append(1);
+ linedashes.append(2);
linedashes.append(1);
+ linedashes.append(2);
}
const CGFloat cglinewidth = pen.widthF() <= 0.0f ? 1.0f : float(pen.widthF());
for(int i = 0; i < linedashes.size(); ++i) {
diff --git a/src/gui/painting/qpaintengine_x11_p.h b/src/gui/painting/qpaintengine_x11_p.h
index f277eeb5e9..f3dd283820 100644
--- a/src/gui/painting/qpaintengine_x11_p.h
+++ b/src/gui/painting/qpaintengine_x11_p.h
@@ -153,6 +153,7 @@ public:
txop = QTransform::TxNone;
has_clipping = false;
render_hints = 0;
+ xform_scale = 1;
#ifndef QT_NO_XRENDER
tessellator = 0;
#endif
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 74eacf640a..3999d48b8b 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -849,7 +849,7 @@ void QCommonStylePrivate::lookupIconTheme() const
dataDirs = QLatin1String("/usr/local/share/:/usr/share/");
dataDirs += QLatin1Char(':') + QApplicationPrivate::kdeHome() + QLatin1String("/share");
dataDirs.prepend(QDir::homePath() + QLatin1String("/:"));
- QStringList kdeDirs = QString::fromLocal8Bit(getenv("KDEDIRS")).split(QLatin1Char(':'));
+ QStringList kdeDirs = QString::fromLocal8Bit(getenv("KDEDIRS")).split(QLatin1Char(':'), QString::SkipEmptyParts);
foreach (const QString &dirName, kdeDirs)
dataDirs.append(QLatin1Char(':') + dirName + QLatin1String("/share"));
iconDirs = dataDirs.split(QLatin1Char(':'));
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index cf40ad836b..1cb806d030 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -855,6 +855,24 @@ void QTextDocumentLayoutPrivate::drawBorder(QPainter *painter, const QRectF &rec
void QTextDocumentLayoutPrivate::drawFrameDecoration(QPainter *painter, QTextFrame *frame, QTextFrameData *fd, const QRectF &clip, const QRectF &rect) const
{
+
+ const QBrush bg = frame->frameFormat().background();
+ if (bg != Qt::NoBrush) {
+ QRectF bgRect = rect;
+ bgRect.adjust((fd->leftMargin + fd->border).toReal(),
+ (fd->topMargin + fd->border).toReal(),
+ - (fd->rightMargin + fd->border).toReal(),
+ - (fd->bottomMargin + fd->border).toReal());
+
+ QRectF gradientRect; // invalid makes it default to bgRect
+ QPointF origin = bgRect.topLeft();
+ if (!frame->parentFrame()) {
+ bgRect = clip;
+ gradientRect.setWidth(painter->device()->width());
+ gradientRect.setHeight(painter->device()->height());
+ }
+ fillBackground(painter, bgRect, bg, origin, gradientRect);
+ }
if (fd->border != 0) {
painter->save();
painter->setBrush(Qt::lightGray);
@@ -875,24 +893,6 @@ void QTextDocumentLayoutPrivate::drawFrameDecoration(QPainter *painter, QTextFra
painter->restore();
}
-
- const QBrush bg = frame->frameFormat().background();
- if (bg != Qt::NoBrush) {
- QRectF bgRect = rect;
- bgRect.adjust((fd->leftMargin + fd->border).toReal(),
- (fd->topMargin + fd->border).toReal(),
- - (fd->rightMargin + fd->border).toReal(),
- - (fd->bottomMargin + fd->border).toReal());
-
- QRectF gradientRect; // invalid makes it default to bgRect
- QPointF origin = bgRect.topLeft();
- if (!frame->parentFrame()) {
- bgRect = clip;
- gradientRect.setWidth(painter->device()->width());
- gradientRect.setHeight(painter->device()->height());
- }
- fillBackground(painter, bgRect, bg, origin, gradientRect);
- }
}
static void adjustContextSelectionsForCell(QAbstractTextDocumentLayout::PaintContext &cell_context,