summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/kernel/qpainter_x11.cpp6
-rw-r--r--src/tools/quuid.cpp13
2 files changed, 18 insertions, 1 deletions
diff --git a/src/kernel/qpainter_x11.cpp b/src/kernel/qpainter_x11.cpp
index 126c0d6..c1e4e07 100644
--- a/src/kernel/qpainter_x11.cpp
+++ b/src/kernel/qpainter_x11.cpp
@@ -1839,7 +1839,8 @@ void QPainter::drawWinFocusRect( int x, int y, int w, int h,
static char winfocus_line[] = { 1, 1 };
QPen old_pen = cpen;
- RasterOp old_rop = (RasterOp)rop;
+ QBrush old_brush = cbrush;
+ RasterOp old_rop = (RasterOp)rop;
if ( xorPaint ) {
if ( QColor::numBitPlanes() <= 8 )
@@ -1858,10 +1859,13 @@ void QPainter::drawWinFocusRect( int x, int y, int w, int h,
if ( testf(ExtDev) ) {
QPDevCmdParam param[1];
QRect r( x, y, w-1, h-1 );
+ QBrush noBrush;
+ setBrush( noBrush );
param[0].rect = &r;
if ( !pdev->cmd( QPaintDevice::PdcDrawRect, this, param ) || !hd) {
setRasterOp( old_rop );
setPen( old_pen );
+ setBrush( old_brush );
return;
}
}
diff --git a/src/tools/quuid.cpp b/src/tools/quuid.cpp
index ee663d7..c745613 100644
--- a/src/tools/quuid.cpp
+++ b/src/tools/quuid.cpp
@@ -389,6 +389,18 @@ QUuid QUuid::createUuid()
return result;
}
#else // !Q_OS_WIN32
+#if defined(Q_OS_LINUX)
+#include <uuid/uuid.h>
+QUuid QUuid::createUuid()
+{
+ uuid_t raw_uuid;
+ char uuid_string[37];
+
+ uuid_generate(raw_uuid);
+ uuid_unparse(raw_uuid, uuid_string);
+ return QUuid(uuid_string);
+}
+#else // !Q_OS_LINUX
#include "qdatetime.h"
#include "stdlib.h" // For srand/rand
QUuid QUuid::createUuid()
@@ -417,5 +429,6 @@ QUuid QUuid::createUuid()
return result;
}
+#endif // !Q_OS_LINUX
#endif // !Q_OS_WIN32