parent
21fcfa3348
commit
cd1f97695b
@ -0,0 +1,180 @@
|
||||
--- src/kernel/qdnd_x11.cpp
|
||||
+++ src/kernel/qdnd_x11.cpp
|
||||
@@ -49,13 +49,15 @@
|
||||
#include "qdragobject.h"
|
||||
#include "qobjectlist.h"
|
||||
#include "qcursor.h"
|
||||
+#include "qbitmap.h"
|
||||
+#include "qpainter.h"
|
||||
|
||||
#include "qt_x11_p.h"
|
||||
|
||||
// conflict resolution
|
||||
|
||||
-// unused, may be used again later: const int XKeyPress = KeyPress;
|
||||
-// unused, may be used again later: const int XKeyRelease = KeyRelease;
|
||||
+const int XKeyPress = KeyPress;
|
||||
+const int XKeyRelease = KeyRelease;
|
||||
#undef KeyPress
|
||||
#undef KeyRelease
|
||||
|
||||
@@ -252,20 +254,47 @@
|
||||
public:
|
||||
QShapedPixmapWidget(int screen = -1) :
|
||||
QWidget(QApplication::desktop()->screen( screen ),
|
||||
- 0, WStyle_Customize | WStyle_Tool | WStyle_NoBorder | WX11BypassWM )
|
||||
+ 0, WStyle_Customize | WStyle_Tool | WStyle_NoBorder | WX11BypassWM ), oldpmser( 0 ), oldbmser( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
- void setPixmap(QPixmap pm)
|
||||
+ void setPixmap(QPixmap pm, QPoint hot)
|
||||
{
|
||||
- if ( pm.mask() ) {
|
||||
+ int bmser = pm.mask() ? pm.mask()->serialNumber() : 0;
|
||||
+ if( oldpmser == pm.serialNumber() && oldbmser == bmser
|
||||
+ && oldhot == hot )
|
||||
+ return;
|
||||
+ oldpmser = pm.serialNumber();
|
||||
+ oldbmser = bmser;
|
||||
+ oldhot = hot;
|
||||
+ bool hotspot_in = !(hot.x() < 0 || hot.y() < 0 || hot.x() >= pm.width() || hot.y() >= pm.height());
|
||||
+// if the pixmap has hotspot in its area, make a "hole" in it at that position
|
||||
+// this will allow XTranslateCoordinates() to find directly the window below the cursor instead
|
||||
+// of finding this pixmap, and therefore there won't be needed any (slow) search for the window
|
||||
+// using findRealWindow()
|
||||
+ if( hotspot_in ) {
|
||||
+ QBitmap mask = pm.mask() ? *pm.mask() : QBitmap( pm.width(), pm.height());
|
||||
+ if( !pm.mask())
|
||||
+ mask.fill( Qt::color1 );
|
||||
+ QPainter p( &mask );
|
||||
+ p.setPen( Qt::color0 );
|
||||
+ p.drawPoint( hot.x(), hot.y());
|
||||
+ p.end();
|
||||
+ pm.setMask( mask );
|
||||
+ setMask( mask );
|
||||
+ } else if ( pm.mask() ) {
|
||||
setMask( *pm.mask() );
|
||||
} else {
|
||||
clearMask();
|
||||
}
|
||||
resize(pm.width(),pm.height());
|
||||
setErasePixmap(pm);
|
||||
+ erase();
|
||||
}
|
||||
+private:
|
||||
+ int oldpmser;
|
||||
+ int oldbmser;
|
||||
+ QPoint oldhot;
|
||||
};
|
||||
|
||||
static QShapedPixmapWidget * qt_xdnd_deco = 0;
|
||||
@@ -862,6 +891,45 @@
|
||||
move( QCursor::pos() );
|
||||
}
|
||||
|
||||
+static bool qt_xdnd_was_move = false;
|
||||
+static bool qt_xdnd_found = false;
|
||||
+// check whole incoming X queue for move events
|
||||
+// checking whole queue is done by always returning False in the predicate
|
||||
+// if there's another move event in the queue, and there's not a mouse button
|
||||
+// or keyboard or ClientMessage event before it, the current move event
|
||||
+// may be safely discarded
|
||||
+// this helps avoiding being overloaded by being flooded from many events
|
||||
+// from the XServer
|
||||
+static
|
||||
+Bool qt_xdnd_predicate( Display*, XEvent* ev, XPointer )
|
||||
+{
|
||||
+ if( qt_xdnd_found )
|
||||
+ return False;
|
||||
+ if( ev->type == MotionNotify )
|
||||
+ {
|
||||
+ qt_xdnd_was_move = true;
|
||||
+ qt_xdnd_found = true;
|
||||
+ }
|
||||
+ if( ev->type == ButtonPress || ev->type == ButtonRelease
|
||||
+ || ev->type == XKeyPress || ev->type == XKeyRelease
|
||||
+ || ev->type == ClientMessage )
|
||||
+ {
|
||||
+ qt_xdnd_was_move = false;
|
||||
+ qt_xdnd_found = true;
|
||||
+ }
|
||||
+ return False;
|
||||
+}
|
||||
+
|
||||
+static
|
||||
+bool qt_xdnd_another_movement()
|
||||
+{
|
||||
+ qt_xdnd_was_move = false;
|
||||
+ qt_xdnd_found = false;
|
||||
+ XEvent dummy;
|
||||
+ XCheckIfEvent( qt_xdisplay(), &dummy, qt_xdnd_predicate, NULL );
|
||||
+ return qt_xdnd_was_move;
|
||||
+}
|
||||
+
|
||||
bool QDragManager::eventFilter( QObject * o, QEvent * e)
|
||||
{
|
||||
if ( beingCancelled ) {
|
||||
@@ -884,8 +952,10 @@
|
||||
|
||||
if ( e->type() == QEvent::MouseMove ) {
|
||||
QMouseEvent* me = (QMouseEvent *)e;
|
||||
- updateMode(me->stateAfter());
|
||||
- move( me->globalPos() );
|
||||
+ if( !qt_xdnd_another_movement()) {
|
||||
+ updateMode(me->stateAfter());
|
||||
+ move( me->globalPos() );
|
||||
+ }
|
||||
return TRUE;
|
||||
} else if ( e->type() == QEvent::MouseButtonRelease ) {
|
||||
qApp->removeEventFilter( this );
|
||||
@@ -1126,7 +1196,7 @@
|
||||
qt_xdnd_deco->grabMouse();
|
||||
}
|
||||
}
|
||||
- updatePixmap();
|
||||
+ updatePixmap( globalPos );
|
||||
|
||||
if ( qt_xdnd_source_sameanswer.contains( globalPos ) &&
|
||||
qt_xdnd_source_sameanswer.isValid() ) {
|
||||
@@ -1717,7 +1787,7 @@
|
||||
// qt_xdnd_source_object persists until we get an xdnd_finish message
|
||||
}
|
||||
|
||||
-void QDragManager::updatePixmap()
|
||||
+void QDragManager::updatePixmap( const QPoint& cursorPos )
|
||||
{
|
||||
if ( qt_xdnd_deco ) {
|
||||
QPixmap pm;
|
||||
@@ -1732,9 +1802,8 @@
|
||||
defaultPm = new QPixmap(default_pm);
|
||||
pm = *defaultPm;
|
||||
}
|
||||
- qt_xdnd_deco->setPixmap(pm);
|
||||
- qt_xdnd_deco->move(QCursor::pos()-pm_hot);
|
||||
- qt_xdnd_deco->repaint(FALSE);
|
||||
+ qt_xdnd_deco->setPixmap(pm, pm_hot);
|
||||
+ qt_xdnd_deco->move(cursorPos-pm_hot);
|
||||
//if ( willDrop ) {
|
||||
qt_xdnd_deco->show();
|
||||
//} else {
|
||||
@@ -1743,4 +1812,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
+void QDragManager::updatePixmap()
|
||||
+{
|
||||
+ updatePixmap( QCursor::pos());
|
||||
+}
|
||||
+
|
||||
#endif // QT_NO_DRAGANDDROP
|
||||
--- src/kernel/qdragobject.h
|
||||
+++ src/kernel/qdragobject.h
|
||||
@@ -245,6 +245,7 @@
|
||||
void move( const QPoint & );
|
||||
void drop();
|
||||
void updatePixmap();
|
||||
+ void updatePixmap( const QPoint& cursorPos );
|
||||
|
||||
private:
|
||||
QDragObject * object;
|
@ -0,0 +1,162 @@
|
||||
--- src/kernel/qapplication_x11.cpp
|
||||
+++ src/kernel/qapplication_x11.cpp
|
||||
@@ -3972,7 +3972,7 @@
|
||||
// Keyboard event translation
|
||||
//
|
||||
|
||||
-static int translateButtonState( int s )
|
||||
+int qt_x11_translateButtonState( int s )
|
||||
{
|
||||
int bst = 0;
|
||||
if ( s & Button1Mask )
|
||||
@@ -4038,7 +4038,7 @@
|
||||
pos.ry() = lastMotion.y;
|
||||
globalPos.rx() = lastMotion.x_root;
|
||||
globalPos.ry() = lastMotion.y_root;
|
||||
- state = translateButtonState( lastMotion.state );
|
||||
+ state = qt_x11_translateButtonState( lastMotion.state );
|
||||
if ( qt_button_down && (state & (LeftButton |
|
||||
MidButton |
|
||||
RightButton ) ) == 0 )
|
||||
@@ -4062,7 +4062,7 @@
|
||||
pos.ry() = xevent->xcrossing.y;
|
||||
globalPos.rx() = xevent->xcrossing.x_root;
|
||||
globalPos.ry() = xevent->xcrossing.y_root;
|
||||
- state = translateButtonState( xevent->xcrossing.state );
|
||||
+ state = qt_x11_translateButtonState( xevent->xcrossing.state );
|
||||
if ( qt_button_down && (state & (LeftButton |
|
||||
MidButton |
|
||||
RightButton ) ) == 0 )
|
||||
@@ -4074,7 +4074,7 @@
|
||||
pos.ry() = event->xbutton.y;
|
||||
globalPos.rx() = event->xbutton.x_root;
|
||||
globalPos.ry() = event->xbutton.y_root;
|
||||
- state = translateButtonState( event->xbutton.state );
|
||||
+ state = qt_x11_translateButtonState( event->xbutton.state );
|
||||
switch ( event->xbutton.button ) {
|
||||
case Button1: button = LeftButton; break;
|
||||
case Button2: button = MidButton; break;
|
||||
@@ -5020,7 +5020,7 @@
|
||||
XKeyEvent xkeyevent = event->xkey;
|
||||
|
||||
// save the modifier state, we will use the keystate uint later by passing
|
||||
- // it to translateButtonState
|
||||
+ // it to qt_x11_translateButtonState
|
||||
uint keystate = event->xkey.state;
|
||||
// remove the modifiers where mode_switch exists... HPUX machines seem
|
||||
// to have alt *AND* mode_switch both in Mod1Mask, which causes
|
||||
@@ -5134,7 +5134,7 @@
|
||||
}
|
||||
#endif // !QT_NO_XIM
|
||||
|
||||
- state = translateButtonState( keystate );
|
||||
+ state = qt_x11_translateButtonState( keystate );
|
||||
|
||||
static int directionKeyEvent = 0;
|
||||
if ( qt_use_rtl_extensions && type == QEvent::KeyRelease ) {
|
||||
--- src/kernel/qdnd_x11.cpp
|
||||
+++ src/kernel/qdnd_x11.cpp
|
||||
@@ -115,6 +115,8 @@
|
||||
Atom qt_xdnd_type_list;
|
||||
const int qt_xdnd_version = 4;
|
||||
|
||||
+extern int qt_x11_translateButtonState( int s );
|
||||
+
|
||||
// Actions
|
||||
//
|
||||
// The Xdnd spec allows for user-defined actions. This could be implemented
|
||||
@@ -199,6 +201,8 @@
|
||||
static int qt_xdnd_current_screen = -1;
|
||||
// state of dragging... true if dragging, false if not
|
||||
bool qt_xdnd_dragging = FALSE;
|
||||
+// need to check state of keyboard modifiers
|
||||
+static bool need_modifiers_check = FALSE;
|
||||
|
||||
// dict of payload data, sorted by type atom
|
||||
static QIntDict<QByteArray> * qt_xdnd_target_data = 0;
|
||||
@@ -887,8 +891,20 @@
|
||||
|
||||
void QDragManager::timerEvent( QTimerEvent* e )
|
||||
{
|
||||
- if ( e->timerId() == heartbeat && qt_xdnd_source_sameanswer.isNull() )
|
||||
- move( QCursor::pos() );
|
||||
+ if ( e->timerId() == heartbeat ) {
|
||||
+ if( need_modifiers_check ) {
|
||||
+ Window root, child;
|
||||
+ int root_x, root_y, win_x, win_y;
|
||||
+ unsigned int mask;
|
||||
+ XQueryPointer( qt_xdisplay(), qt_xrootwin( qt_xdnd_current_screen ),
|
||||
+ &root, &child, &root_x, &root_y, &win_x, &win_y, &mask );
|
||||
+ if( updateMode( (ButtonState)qt_x11_translateButtonState( mask )))
|
||||
+ qt_xdnd_source_sameanswer = QRect(); // force move
|
||||
+ }
|
||||
+ need_modifiers_check = TRUE;
|
||||
+ if( qt_xdnd_source_sameanswer.isNull() )
|
||||
+ move( QCursor::pos() );
|
||||
+ }
|
||||
}
|
||||
|
||||
static bool qt_xdnd_was_move = false;
|
||||
@@ -956,6 +972,7 @@
|
||||
updateMode(me->stateAfter());
|
||||
move( me->globalPos() );
|
||||
}
|
||||
+ need_modifiers_check = FALSE;
|
||||
return TRUE;
|
||||
} else if ( e->type() == QEvent::MouseButtonRelease ) {
|
||||
qApp->removeEventFilter( this );
|
||||
@@ -994,9 +1011,11 @@
|
||||
beingCancelled = FALSE;
|
||||
qApp->exit_loop();
|
||||
} else {
|
||||
- updateMode(ke->stateAfter());
|
||||
- qt_xdnd_source_sameanswer = QRect(); // force move
|
||||
- move( QCursor::pos() );
|
||||
+ if( updateMode(ke->stateAfter())) {
|
||||
+ qt_xdnd_source_sameanswer = QRect(); // force move
|
||||
+ move( QCursor::pos() );
|
||||
+ }
|
||||
+ need_modifiers_check = FALSE;
|
||||
}
|
||||
return TRUE; // Eat all key events
|
||||
}
|
||||
@@ -1023,10 +1042,10 @@
|
||||
|
||||
|
||||
static Qt::ButtonState oldstate;
|
||||
-void QDragManager::updateMode( ButtonState newstate )
|
||||
+bool QDragManager::updateMode( ButtonState newstate )
|
||||
{
|
||||
if ( newstate == oldstate )
|
||||
- return;
|
||||
+ return false;
|
||||
const int both = ShiftButton|ControlButton;
|
||||
if ( (newstate & both) == both ) {
|
||||
global_requested_action = QDropEvent::Link;
|
||||
@@ -1050,6 +1069,7 @@
|
||||
}
|
||||
}
|
||||
oldstate = newstate;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1754,6 +1774,7 @@
|
||||
qt_xdnd_source_sameanswer = QRect();
|
||||
move(QCursor::pos());
|
||||
heartbeat = startTimer(200);
|
||||
+ need_modifiers_check = FALSE;
|
||||
|
||||
#ifndef QT_NO_CURSOR
|
||||
qApp->setOverrideCursor( arrowCursor );
|
||||
--- src/kernel/qdragobject.h
|
||||
+++ src/kernel/qdragobject.h
|
||||
@@ -249,7 +249,7 @@
|
||||
|
||||
private:
|
||||
QDragObject * object;
|
||||
- void updateMode( ButtonState newstate );
|
||||
+ bool updateMode( ButtonState newstate );
|
||||
void updateCursor();
|
||||
#if defined(Q_WS_X11)
|
||||
void createCursors();
|
@ -0,0 +1,569 @@
|
||||
qt-bugs@ issue : 11790 (part of)
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
NOTE: Needs #define QT_MITSHM in the matching qplatformdefs.h file. This
|
||||
patch does so only for linux-g++ and linux-g++-distcc platforms.
|
||||
|
||||
MITSHM extension support for QPixmap<->QImage conversions.
|
||||
|
||||
Hello,
|
||||
|
||||
the review and apply the attached patches that improve performance of
|
||||
QImage->QPixmap conversions. They should be applied in order
|
||||
'mitshm','more_local' and 'fast', but they're independent from each other
|
||||
(well, besides merging problems).
|
||||
|
||||
Mitshm patch adds MITSHM extension support for both
|
||||
QPixmap::convertFromImage() and QPixmap::convertToImage(). I've noticed there
|
||||
was some MITSHM support already, turned off by default, but it was used only
|
||||
for QPixmap::xForm() , and it used shared pixmaps (and I'd bet nobody uses
|
||||
it). My patch adds shared ximages support for faster pixmap<->image
|
||||
conversions. Since I don't understand the xForm() code much, and I didn't
|
||||
want to do anything with it, I added three #define's:
|
||||
- QT_MITSHM generally enabling MITSHM support, which should be set in
|
||||
qplatformsdefs.h (or wherever you setup platform specific stuff), it can be
|
||||
enabled at least on Linux
|
||||
- QT_MITSHM_CONVERSIONS - this is for my new code
|
||||
- QT_MITSHM_XFORM - this is for the xForm() code
|
||||
There's one more #define, QT_MITSHM_RMID_IGNORES_REFCOUNT. Glibc
|
||||
documentation of shmctl( ... IPC_RMID ) quite clearly says that the memory
|
||||
segment is freed only after the refcount increased by shmat() and decreased
|
||||
by shmdt() is 0. However, at least according to
|
||||
http://bugs.kde.org/show_bug.cgi?id=27517 , this doesn't happen on other
|
||||
platforms for some strange reason. Such platforms should have this #define if
|
||||
you ever consider supporting MITSHM on them.
|
||||
|
||||
The lower limit for using MITSHM for the image is about 8KiB
|
||||
(width*height*depth > 100*100*32 ). Also, BestOptim in such case doesn't keep
|
||||
the ximage, as the shared ximage is always freed before the function returns
|
||||
(I don't know if it's worth copying it).
|
||||
|
||||
The second patch ('more_local'), in short, does nothing. Besides improving
|
||||
performance by about 10% by making variables more "local", making few of them
|
||||
const, and also making some of them unsigned (this help gcc for some reason).
|
||||
|
||||
The last one, 'fast', moves some if's out of the loops, and handles some most
|
||||
common case specially (15bpp, 16bpp and 32bpp ximage depths). 32bpp case, if
|
||||
the endianess matches, is simply uses memcpy(), for the 15/16bpp depth,
|
||||
variables are replaced directly by matching values, statements are a bit
|
||||
reordered and merged when suitable, and again, in case endianess matches,
|
||||
pixels are written simply as Q_INT16. Most probably it would also help to
|
||||
process two pixels at once and write them as Q_INT32, but I didn't want to
|
||||
complicate the code too much (later >;) ).
|
||||
|
||||
The last snippet of 'fast' handles case when xi->bytes_per_line is not equal
|
||||
to width for 8bpp ximage. I'm not actually sure if that can ever happen, but
|
||||
since I've already written it *shrug*.
|
||||
|
||||
The 'more_local' and 'fast' patches change only convertFromImage(), as I
|
||||
don't think convertToImage() is that performance critical (but it's as
|
||||
unoptimized as convertFromImage() was).
|
||||
|
||||
Maybe some numbers. The difference is of course mainly visible with larger
|
||||
pixmaps. The two optimizations alone reduce the time to 50% for 32bpp, to 70%
|
||||
for 16bpp. The MITSHM support, when other patches are already applied too,
|
||||
for 32bpp images saves about 33%. Together, the total time is reduced to
|
||||
about 40% for 32bpp. Imlib probably still beats that, but at least this
|
||||
obsoletes KPixmapIO.
|
||||
|
||||
|
||||
--- src/kernel/qpixmap_x11.cpp
|
||||
+++ src/kernel/qpixmap_x11.cpp
|
||||
@@ -37,7 +37,19 @@
|
||||
|
||||
// NOT REVISED
|
||||
|
||||
+#include "qplatformdefs.h"
|
||||
+
|
||||
+#if defined(Q_OS_WIN32) && defined(QT_MITSHM)
|
||||
+#undef QT_MITSHM
|
||||
+#endif
|
||||
+
|
||||
+#ifdef QT_MITSHM
|
||||
+
|
||||
+// Use the MIT Shared Memory extension for pixmap<->image conversions
|
||||
+#define QT_MITSHM_CONVERSIONS
|
||||
+
|
||||
// Uncomment the next line to enable the MIT Shared Memory extension
|
||||
+// for QPixmap::xForm()
|
||||
//
|
||||
// WARNING: This has some problems:
|
||||
//
|
||||
@@ -45,14 +57,13 @@
|
||||
// 2. Qt does not handle the ShmCompletion message, so you will
|
||||
// get strange effects if you xForm() repeatedly.
|
||||
//
|
||||
-// #define QT_MITSHM
|
||||
+// #define QT_MITSHM_XFORM
|
||||
|
||||
-#if defined(Q_OS_WIN32) && defined(QT_MITSHM)
|
||||
-#undef QT_MITSHM
|
||||
+#else
|
||||
+#undef QT_MITSHM_CONVERSIONS
|
||||
+#undef QT_MITSHM_XFORM
|
||||
#endif
|
||||
|
||||
-#include "qplatformdefs.h"
|
||||
-
|
||||
#include "qbitmap.h"
|
||||
#include "qpaintdevicemetrics.h"
|
||||
#include "qimage.h"
|
||||
@@ -91,7 +102,7 @@ inline static void qSafeXDestroyImage( X
|
||||
MIT Shared Memory Extension support: makes xForm noticeably (~20%) faster.
|
||||
*****************************************************************************/
|
||||
|
||||
-#if defined(QT_MITSHM)
|
||||
+#if defined(QT_MITSHM_XFORM)
|
||||
|
||||
static bool xshminit = FALSE;
|
||||
static XShmSegmentInfo xshminfo;
|
||||
@@ -173,8 +184,100 @@ static bool qt_create_mitshm_buffer( con
|
||||
// return FALSE;
|
||||
// }
|
||||
|
||||
-#endif // QT_MITSHM
|
||||
+#endif // QT_MITSHM_XFORM
|
||||
+
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+
|
||||
+static bool qt_mitshm_error = false;
|
||||
+static int qt_mitshm_errorhandler( Display*, XErrorEvent* )
|
||||
+{
|
||||
+ qt_mitshm_error = true;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static XImage* qt_XShmCreateImage( Display* dpy, Visual* visual, unsigned int depth,
|
||||
+ int format, int /*offset*/, char* /*data*/, unsigned int width, unsigned int height,
|
||||
+ int /*bitmap_pad*/, int /*bytes_per_line*/, XShmSegmentInfo* shminfo )
|
||||
+{
|
||||
+ if( width * height * depth < 100*100*32 )
|
||||
+ return NULL;
|
||||
+ static int shm_inited = -1;
|
||||
+ if( shm_inited == -1 ) {
|
||||
+ if( XShmQueryExtension( dpy ))
|
||||
+ shm_inited = 1;
|
||||
+ else
|
||||
+ shm_inited = 0;
|
||||
+ }
|
||||
+ if( shm_inited == 0 )
|
||||
+ return NULL;
|
||||
+ XImage* xi = XShmCreateImage( dpy, visual, depth, format, NULL, shminfo, width,
|
||||
+ height );
|
||||
+ if( xi == NULL )
|
||||
+ return NULL;
|
||||
+ shminfo->shmid = shmget( IPC_PRIVATE, xi->bytes_per_line * xi->height,
|
||||
+ IPC_CREAT|0600);
|
||||
+ if( shminfo->shmid < 0 ) {
|
||||
+ XDestroyImage( xi );
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ shminfo->readOnly = False;
|
||||
+ shminfo->shmaddr = (char*)shmat( shminfo->shmid, 0, 0 );
|
||||
+ if( shminfo->shmaddr == (char*)-1 ) {
|
||||
+ XDestroyImage( xi );
|
||||
+ shmctl( shminfo->shmid, IPC_RMID, 0 );
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ xi->data = shminfo->shmaddr;
|
||||
+#ifndef QT_MITSHM_RMID_IGNORES_REFCOUNT
|
||||
+ // mark as deleted to automatically free the memory in case
|
||||
+ // of a crash (but this doesn't work e.g. on Solaris)
|
||||
+ shmctl( shminfo->shmid, IPC_RMID, 0 );
|
||||
+#endif
|
||||
+ if( shm_inited == 1 ) { // first time
|
||||
+ XErrorHandler old_h = XSetErrorHandler( qt_mitshm_errorhandler );
|
||||
+ XShmAttach( dpy, shminfo );
|
||||
+ shm_inited = 2;
|
||||
+ XSync( dpy, False );
|
||||
+ XSetErrorHandler( old_h );
|
||||
+ if( qt_mitshm_error ) { // oops ... perhaps we are remote?
|
||||
+ shm_inited = 0;
|
||||
+ XDestroyImage( xi );
|
||||
+ shmdt( shminfo->shmaddr );
|
||||
+#ifdef QT_MITSHM_RMID_IGNORES_REFCOUNT
|
||||
+ shmctl( shminfo->shmid, IPC_RMID, 0 );
|
||||
+#endif
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ } else
|
||||
+ XShmAttach( dpy, shminfo );
|
||||
+ return xi;
|
||||
+}
|
||||
+
|
||||
+static void qt_XShmDestroyImage( XImage* xi, XShmSegmentInfo* shminfo )
|
||||
+{
|
||||
+ XShmDetach( QPaintDevice::x11AppDisplay(), shminfo );
|
||||
+ XDestroyImage( xi );
|
||||
+ shmdt( shminfo->shmaddr );
|
||||
+#ifdef QT_MITSHM_RMID_IGNORES_REFCOUNT
|
||||
+ shmctl( shminfo->shmid, IPC_RMID, 0 );
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static XImage* qt_XShmGetImage( const QPixmap* pix, int format,
|
||||
+ XShmSegmentInfo* shminfo )
|
||||
+{
|
||||
+ XImage* xi = qt_XShmCreateImage( pix->x11Display(), (Visual*)pix->x11Visual(),
|
||||
+ pix->depth(), format, 0, 0, pix->width(), pix->height(), 32, 0, shminfo );
|
||||
+ if( xi == NULL )
|
||||
+ return NULL;
|
||||
+ if( XShmGetImage( pix->x11Display(), pix->handle(), xi, 0, 0, AllPlanes ) == False ) {
|
||||
+ qt_XShmDestroyImage( xi, shminfo );
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ return xi;
|
||||
+}
|
||||
|
||||
+#endif // QT_MITSHM_CONVERSIONS
|
||||
|
||||
/*****************************************************************************
|
||||
Internal functions
|
||||
@@ -627,9 +730,20 @@ QImage QPixmap::convertToImage() const
|
||||
d = 32; // > 8 ==> 32
|
||||
|
||||
XImage *xi = (XImage *)data->ximage; // any cached ximage?
|
||||
- if ( !xi ) // fetch data from X server
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ bool mitshm_ximage = false;
|
||||
+ XShmSegmentInfo shminfo;
|
||||
+#endif
|
||||
+ if ( !xi ) { // fetch data from X server
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ xi = qt_XShmGetImage( this, mono ? XYPixmap : ZPixmap, &shminfo );
|
||||
+ if( xi ) {
|
||||
+ mitshm_ximage = true;
|
||||
+ } else
|
||||
+#endif
|
||||
xi = XGetImage( x11Display(), hd, 0, 0, w, h, AllPlanes,
|
||||
mono ? XYPixmap : ZPixmap );
|
||||
+ }
|
||||
Q_CHECK_PTR( xi );
|
||||
if (!xi)
|
||||
return image; // null image
|
||||
@@ -640,15 +754,31 @@ QImage QPixmap::convertToImage() const
|
||||
QImage::LittleEndian : QImage::BigEndian;
|
||||
}
|
||||
image.create( w, h, d, 0, bitOrder );
|
||||
- if ( image.isNull() ) // could not create image
|
||||
+ if ( image.isNull() ) { // could not create image
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ if( mitshm_ximage )
|
||||
+ qt_XShmDestroyImage( xi, &shminfo );
|
||||
+ else
|
||||
+#endif
|
||||
+ qSafeXDestroyImage( xi );
|
||||
return image;
|
||||
+ }
|
||||
|
||||
const QPixmap* msk = mask();
|
||||
const QPixmap *alf = data->alphapm;
|
||||
|
||||
QImage alpha;
|
||||
if (alf) {
|
||||
- XImage *axi = XGetImage(x11Display(), alf->hd, 0, 0, w, h, AllPlanes, ZPixmap);
|
||||
+ XImage* axi;
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ bool mitshm_aximage = false;
|
||||
+ XShmSegmentInfo ashminfo;
|
||||
+ axi = qt_XShmGetImage( alf, ZPixmap, &ashminfo );
|
||||
+ if( axi ) {
|
||||
+ mitshm_aximage = true;
|
||||
+ } else
|
||||
+#endif
|
||||
+ axi = XGetImage(x11Display(), alf->hd, 0, 0, w, h, AllPlanes, ZPixmap);
|
||||
|
||||
if (axi) {
|
||||
image.setAlphaBuffer( TRUE );
|
||||
@@ -662,6 +792,11 @@ QImage QPixmap::convertToImage() const
|
||||
src += axi->bytes_per_line;
|
||||
}
|
||||
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ if( mitshm_aximage )
|
||||
+ qt_XShmDestroyImage( axi, &ashminfo );
|
||||
+ else
|
||||
+#endif
|
||||
qSafeXDestroyImage( axi );
|
||||
}
|
||||
} else if (msk) {
|
||||
@@ -804,6 +939,12 @@ QImage QPixmap::convertToImage() const
|
||||
xi->bits_per_pixel );
|
||||
#endif
|
||||
image.reset();
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ if( mitshm_ximage )
|
||||
+ qt_XShmDestroyImage( xi, &shminfo );
|
||||
+ else
|
||||
+#endif
|
||||
+ qSafeXDestroyImage( xi );
|
||||
return image;
|
||||
}
|
||||
|
||||
@@ -909,10 +1050,22 @@ QImage QPixmap::convertToImage() const
|
||||
delete [] carr;
|
||||
}
|
||||
if ( data->optim != BestOptim ) { // throw away image data
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ if( mitshm_ximage )
|
||||
+ qt_XShmDestroyImage( xi, &shminfo );
|
||||
+ else
|
||||
+#endif
|
||||
qSafeXDestroyImage( xi );
|
||||
((QPixmap*)this)->data->ximage = 0;
|
||||
- } else // keep ximage data
|
||||
+ } else { // keep ximage data
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ if( mitshm_ximage ) { // copy the XImage?
|
||||
+ qt_XShmDestroyImage( xi, &shminfo );
|
||||
+ xi = 0;
|
||||
+ }
|
||||
+#endif
|
||||
((QPixmap*)this)->data->ximage = xi;
|
||||
+ }
|
||||
|
||||
return image;
|
||||
}
|
||||
@@ -1085,6 +1238,11 @@ bool QPixmap::convertFromImage( const QI
|
||||
bool trucol = (visual->c_class == TrueColor || visual->c_class == DirectColor);
|
||||
int nbytes = image.numBytes();
|
||||
uchar *newbits= 0;
|
||||
+ int newbits_size = 0;
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ bool mitshm_ximage = false;
|
||||
+ XShmSegmentInfo shminfo;
|
||||
+#endif
|
||||
|
||||
if ( trucol ) { // truecolor display
|
||||
QRgb pix[256]; // pixel translation table
|
||||
@@ -1113,10 +1271,18 @@ bool QPixmap::convertFromImage( const QI
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ xi = qt_XShmCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0, &shminfo );
|
||||
+ if( xi != NULL ) {
|
||||
+ mitshm_ximage = true;
|
||||
+ newbits = (uchar*)xi->data;
|
||||
+ }
|
||||
+ else
|
||||
+#endif
|
||||
xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
|
||||
- Q_CHECK_PTR( xi );
|
||||
if (!xi)
|
||||
return false;
|
||||
+ if( newbits == NULL )
|
||||
newbits = (uchar *)malloc( xi->bytes_per_line*h );
|
||||
Q_CHECK_PTR( newbits );
|
||||
if ( !newbits ) // no memory
|
||||
@@ -1323,6 +1489,7 @@ bool QPixmap::convertFromImage( const QI
|
||||
}
|
||||
|
||||
newbits = (uchar *)malloc( nbytes ); // copy image into newbits
|
||||
+ newbits_size = nbytes;
|
||||
Q_CHECK_PTR( newbits );
|
||||
if ( !newbits ) // no memory
|
||||
return FALSE;
|
||||
@@ -1440,11 +1607,18 @@ bool QPixmap::convertFromImage( const QI
|
||||
}
|
||||
|
||||
if ( !xi ) { // X image not created
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ xi = qt_XShmCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0, &shminfo );
|
||||
+ if( xi != NULL )
|
||||
+ mitshm_ximage = true;
|
||||
+ else
|
||||
+#endif
|
||||
xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
|
||||
if ( xi->bits_per_pixel == 16 ) { // convert 8 bpp ==> 16 bpp
|
||||
ushort *p2;
|
||||
int p2inc = xi->bytes_per_line/sizeof(ushort);
|
||||
ushort *newerbits = (ushort *)malloc( xi->bytes_per_line * h );
|
||||
+ newbits_size = xi->bytes_per_line * h;
|
||||
Q_CHECK_PTR( newerbits );
|
||||
if ( !newerbits ) // no memory
|
||||
return FALSE;
|
||||
@@ -1462,6 +1636,14 @@ bool QPixmap::convertFromImage( const QI
|
||||
"(bpp=%d)", xi->bits_per_pixel );
|
||||
#endif
|
||||
}
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ if( newbits_size > 0 && mitshm_ximage ) { // need to copy to shared memory
|
||||
+ memcpy( xi->data, newbits, newbits_size );
|
||||
+ free( newbits );
|
||||
+ newbits = (uchar*)xi->data;
|
||||
+ }
|
||||
+ else
|
||||
+#endif
|
||||
xi->data = (char *)newbits;
|
||||
}
|
||||
|
||||
@@ -1495,19 +1677,24 @@ bool QPixmap::convertFromImage( const QI
|
||||
|
||||
}
|
||||
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ if( mitshm_ximage )
|
||||
+ XShmPutImage( dpy, hd, qt_xget_readonly_gc( x11Screen(), FALSE ),
|
||||
+ xi, 0, 0, 0, 0, w, h, False );
|
||||
+ else
|
||||
+#endif
|
||||
XPutImage( dpy, hd, qt_xget_readonly_gc( x11Screen(), FALSE ),
|
||||
xi, 0, 0, 0, 0, w, h );
|
||||
|
||||
- if ( data->optim != BestOptim ) { // throw away image
|
||||
- qSafeXDestroyImage( xi );
|
||||
- data->ximage = 0;
|
||||
- } else { // keep ximage that we created
|
||||
- data->ximage = xi;
|
||||
- }
|
||||
data->w = w;
|
||||
data->h = h;
|
||||
data->d = dd;
|
||||
|
||||
+ XImage* axi = NULL;
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ bool mitshm_aximage = false;
|
||||
+ XShmSegmentInfo ashminfo;
|
||||
+#endif
|
||||
if ( image.hasAlphaBuffer() ) {
|
||||
QBitmap m;
|
||||
m = image.createAlphaMask( conversion_flags );
|
||||
@@ -1543,13 +1730,22 @@ bool QPixmap::convertFromImage( const QI
|
||||
data->alphapm->rendhd =
|
||||
(HANDLE) XftDrawCreateAlpha( x11Display(), data->alphapm->hd, 8 );
|
||||
|
||||
- XImage *axi = XCreateImage(x11Display(), (Visual *) x11Visual(),
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ axi = qt_XShmCreateImage( x11Display(), (Visual*)x11Visual(),
|
||||
+ 8, ZPixmap, 0, 0, w, h, 8, 0, &ashminfo );
|
||||
+ if( axi != NULL )
|
||||
+ mitshm_aximage = true;
|
||||
+ else
|
||||
+#endif
|
||||
+ axi = XCreateImage(x11Display(), (Visual *) x11Visual(),
|
||||
8, ZPixmap, 0, 0, w, h, 8, 0);
|
||||
|
||||
if (axi) {
|
||||
+ if( axi->data==NULL ) {
|
||||
// the data is deleted by qSafeXDestroyImage
|
||||
axi->data = (char *) malloc(h * axi->bytes_per_line);
|
||||
Q_CHECK_PTR( axi->data );
|
||||
+ }
|
||||
char *aptr = axi->data;
|
||||
|
||||
if (image.depth() == 32) {
|
||||
@@ -1567,14 +1763,48 @@ bool QPixmap::convertFromImage( const QI
|
||||
}
|
||||
|
||||
GC gc = XCreateGC(x11Display(), data->alphapm->hd, 0, 0);
|
||||
+ #ifdef QT_MITSHM_CONVERSIONS
|
||||
+ if( mitshm_aximage )
|
||||
+ XShmPutImage( dpy, data->alphapm->hd, gc, axi, 0, 0, 0, 0, w, h, False );
|
||||
+ else
|
||||
+#endif
|
||||
XPutImage(dpy, data->alphapm->hd, gc, axi, 0, 0, 0, 0, w, h);
|
||||
XFreeGC(x11Display(), gc);
|
||||
- qSafeXDestroyImage(axi);
|
||||
}
|
||||
}
|
||||
#endif // QT_NO_XFTFREETYPE
|
||||
}
|
||||
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ if( mitshm_ximage || mitshm_aximage )
|
||||
+ XSync( x11Display(), False ); // wait until processed
|
||||
+#endif
|
||||
+
|
||||
+ if ( data->optim != BestOptim ) { // throw away image
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ if( mitshm_ximage )
|
||||
+ qt_XShmDestroyImage( xi, &shminfo );
|
||||
+ else
|
||||
+#endif
|
||||
+ qSafeXDestroyImage( xi );
|
||||
+ data->ximage = 0;
|
||||
+ } else { // keep ximage that we created
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ if( mitshm_ximage ) { // copy the XImage?
|
||||
+ qt_XShmDestroyImage( xi, &shminfo );
|
||||
+ xi = 0;
|
||||
+ }
|
||||
+#endif
|
||||
+ data->ximage = xi;
|
||||
+ }
|
||||
+ if( axi ) {
|
||||
+#ifdef QT_MITSHM_CONVERSIONS
|
||||
+ if( mitshm_aximage )
|
||||
+ qt_XShmDestroyImage( axi, &ashminfo );
|
||||
+ else
|
||||
+#endif
|
||||
+ qSafeXDestroyImage(axi);
|
||||
+ }
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1737,7 +1967,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
|
||||
return pm;
|
||||
}
|
||||
|
||||
-#if defined(QT_MITSHM)
|
||||
+#if defined(QT_MITSHM_XFORM)
|
||||
static bool try_once = TRUE;
|
||||
if (try_once) {
|
||||
try_once = FALSE;
|
||||
@@ -1770,7 +2000,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
|
||||
dbpl = ((w*bpp+31)/32)*4;
|
||||
dbytes = dbpl*h;
|
||||
|
||||
-#if defined(QT_MITSHM)
|
||||
+#if defined(QT_MITSHM_XFORM)
|
||||
if ( use_mitshm ) {
|
||||
dptr = (uchar *)xshmimg->data;
|
||||
uchar fillbyte = bpp == 8 ? white.pixel() : 0xff;
|
||||
@@ -1786,7 +2016,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
|
||||
memset( dptr, Qt::white.pixel( x11Screen() ), dbytes );
|
||||
else
|
||||
memset( dptr, 0xff, dbytes );
|
||||
-#if defined(QT_MITSHM)
|
||||
+#if defined(QT_MITSHM_XFORM)
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1817,7 +2047,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
|
||||
} else {
|
||||
xbpl = (w*bpp)/8;
|
||||
p_inc = dbpl - xbpl;
|
||||
-#if defined(QT_MITSHM)
|
||||
+#if defined(QT_MITSHM_XFORM)
|
||||
if ( use_mitshm )
|
||||
p_inc = xshmimg->bytes_per_line - xbpl;
|
||||
#endif
|
||||
@@ -1854,7 +2084,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
|
||||
QPixmap pm( w, h );
|
||||
pm.data->uninit = FALSE;
|
||||
pm.x11SetScreen( x11Screen() );
|
||||
-#if defined(QT_MITSHM)
|
||||
+#if defined(QT_MITSHM_XFORM)
|
||||
if ( use_mitshm ) {
|
||||
XCopyArea( dpy, xshmpm, pm.handle(), gc, 0, 0, w, h, 0, 0 );
|
||||
} else {
|
||||
@@ -1863,7 +2093,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
|
||||
ZPixmap, 0, (char *)dptr, w, h, 32, 0 );
|
||||
XPutImage( dpy, pm.handle(), gc, xi, 0, 0, 0, 0, w, h);
|
||||
qSafeXDestroyImage( xi );
|
||||
-#if defined(QT_MITSHM)
|
||||
+#if defined(QT_MITSHM_XFORM)
|
||||
}
|
||||
#endif
|
||||
|
||||
--- mkspecs/linux-g++/qplatformdefs.h
|
||||
+++ mkspecs/linux-g++/qplatformdefs.h
|
||||
@@ -102,5 +102,6 @@
|
||||
#define QT_VSNPRINTF ::vsnprintf
|
||||
#endif
|
||||
|
||||
+#define QT_MITSHM
|
||||
|
||||
#endif // QPLATFORMDEFS_H
|
@ -0,0 +1,384 @@
|
||||
qt-bugs@ issue : 11790 (part of)
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
See 0005-qpixmap_mitshm.patch for details.
|
||||
|
||||
|
||||
--- src/kernel/qpixmap_x11.cpp
|
||||
+++ src/kernel/qpixmap_x11.cpp
|
||||
@@ -1123,9 +1123,6 @@ bool QPixmap::convertFromImage( const QI
|
||||
return FALSE;
|
||||
int bppc = xi->bits_per_pixel;
|
||||
|
||||
- if ( bppc > 8 && xi->byte_order == LSBFirst )
|
||||
- bppc++;
|
||||
-
|
||||
bool contig_bits = n_bits(red_mask) == rbits &&
|
||||
n_bits(green_mask) == gbits &&
|
||||
n_bits(blue_mask) == bbits;
|
||||
@@ -1174,32 +1171,70 @@ bool QPixmap::convertFromImage( const QI
|
||||
}
|
||||
init=TRUE;
|
||||
}
|
||||
+
|
||||
+ enum { BPP8,
|
||||
+ BPP16_8_3_M3, BPP16_7_2_M3, BPP16_MSB, BPP16_LSB,
|
||||
+ BPP24_MSB, BPP24_LSB,
|
||||
+ BPP32_16_8_0, BPP32_MSB, BPP32_LSB
|
||||
+ } mode = BPP8;
|
||||
|
||||
- for ( uint y=0; y<h; y++ ) {
|
||||
- uchar* src = image.scanLine( y );
|
||||
- uchar* dst = newbits + xi->bytes_per_line*y;
|
||||
- QRgb* p = (QRgb *)src;
|
||||
+ if ( bppc > 8 && xi->byte_order == LSBFirst )
|
||||
+ bppc++;
|
||||
|
||||
-#define GET_RGB \
|
||||
- int r = qRed ( *p ); \
|
||||
- int g = qGreen( *p ); \
|
||||
- int b = qBlue ( *p++ ); \
|
||||
- r = red_shift > 0 \
|
||||
- ? r << red_shift : r >> -red_shift; \
|
||||
- g = green_shift > 0 \
|
||||
- ? g << green_shift : g >> -green_shift; \
|
||||
- b = blue_shift > 0 \
|
||||
- ? b << blue_shift : b >> -blue_shift;
|
||||
+ int wordsize;
|
||||
+ bool bigendian;
|
||||
+ qSysInfo( &wordsize, &bigendian );
|
||||
+ bool same_msb_lsb = ( xi->byte_order == MSBFirst ) == ( bigendian );
|
||||
+
|
||||
+ if( bppc == 8 ) // 8 bit
|
||||
+ mode = BPP8;
|
||||
+ else if( bppc == 16 || bppc == 17 ) { // 16 bit MSB/LSB
|
||||
+ if( red_shift == 8 && green_shift == 3 && blue_shift == -3
|
||||
+ && !d8 && same_msb_lsb )
|
||||
+ mode = BPP16_8_3_M3;
|
||||
+ else if( red_shift == 7 && green_shift == 2 && blue_shift == -3
|
||||
+ && !d8 && same_msb_lsb )
|
||||
+ mode = BPP16_7_2_M3;
|
||||
+ else
|
||||
+ mode = bppc == 17 ? BPP16_LSB : BPP16_MSB;
|
||||
+ } else if( bppc == 24 || bppc == 25 ) { // 24 bit MSB/LSB
|
||||
+ mode = bppc == 25 ? BPP24_LSB : BPP24_MSB;
|
||||
+ } else if( bppc == 32 || bppc == 33 ) { // 32 bit MSB/LSB
|
||||
+ if( red_shift == 16 && green_shift == 8 && blue_shift == 0
|
||||
+ && !d8 && same_msb_lsb )
|
||||
+ mode = BPP32_16_8_0;
|
||||
+ else
|
||||
+ mode = bppc == 33 ? BPP32_LSB : BPP32_MSB;
|
||||
+ } else
|
||||
+ qFatal("Logic error 3");
|
||||
|
||||
#define GET_PIXEL \
|
||||
int pixel; \
|
||||
if ( d8 ) pixel = pix[*src++]; \
|
||||
else { \
|
||||
- GET_RGB \
|
||||
- pixel = (b & blue_mask)|(g & green_mask) | (r & red_mask) \
|
||||
+ int r = qRed ( *p ); \
|
||||
+ int g = qGreen( *p ); \
|
||||
+ int b = qBlue ( *p++ ); \
|
||||
+ r = red_shift > 0 \
|
||||
+ ? r << red_shift : r >> -red_shift; \
|
||||
+ g = green_shift > 0 \
|
||||
+ ? g << green_shift : g >> -green_shift; \
|
||||
+ b = blue_shift > 0 \
|
||||
+ ? b << blue_shift : b >> -blue_shift; \
|
||||
+ pixel = (r & red_mask)|(g & green_mask) | (b & blue_mask) \
|
||||
| ~(blue_mask | green_mask | red_mask); \
|
||||
}
|
||||
|
||||
+// optimized case - no d8 case, shift only once instead of twice, mask only once instead of twice,
|
||||
+// use direct values instead of variables, and use only one statement
|
||||
+// (*p >> 16), (*p >> 8 ) and (*p) are qRed(),qGreen() and qBlue() without masking
|
||||
+// shifts have to be passed including the shift operator (e.g. '>>3'), because of the direction
|
||||
+#define GET_PIXEL_OPT(red_shift,green_shift,blue_shift,red_mask,green_mask,blue_mask) \
|
||||
+ int pixel = ((( *p >> 16 ) red_shift ) & red_mask ) \
|
||||
+ | ((( *p >> 8 ) green_shift ) & green_mask ) \
|
||||
+ | ((( *p ) blue_shift ) & blue_mask ); \
|
||||
+ ++p;
|
||||
+
|
||||
#define GET_PIXEL_DITHER_TC \
|
||||
int r = qRed ( *p ); \
|
||||
int g = qGreen( *p ); \
|
||||
@@ -1220,91 +1255,177 @@ bool QPixmap::convertFromImage( const QI
|
||||
? g << green_shift : g >> -green_shift; \
|
||||
b = blue_shift > 0 \
|
||||
? b << blue_shift : b >> -blue_shift; \
|
||||
- int pixel = (b & blue_mask)|(g & green_mask) | (r & red_mask);
|
||||
+ int pixel = (r & red_mask)|(g & green_mask) | (b & blue_mask);
|
||||
|
||||
- if ( dither_tc ) {
|
||||
- uint x;
|
||||
- switch ( bppc ) {
|
||||
- case 16: // 16 bit MSB
|
||||
- for ( x=0; x<w; x++ ) {
|
||||
- GET_PIXEL_DITHER_TC
|
||||
- *dst++ = (pixel >> 8);
|
||||
- *dst++ = pixel;
|
||||
- }
|
||||
+// again, optimized case
|
||||
+// can't be optimized that much :(
|
||||
+#define GET_PIXEL_DITHER_TC_OPT(red_shift,green_shift,blue_shift,red_mask,green_mask,blue_mask, \
|
||||
+ rbits,gbits,bbits) \
|
||||
+ const int thres = D[x%16][y%16]; \
|
||||
+ int r = qRed ( *p ); \
|
||||
+ if ( r <= (255-(1<<(8-rbits))) && ((r<<rbits) & 255) \
|
||||
+ > thres) \
|
||||
+ r += (1<<(8-rbits)); \
|
||||
+ int g = qGreen( *p ); \
|
||||
+ if ( g <= (255-(1<<(8-gbits))) && ((g<<gbits) & 255) \
|
||||
+ > thres) \
|
||||
+ g += (1<<(8-gbits)); \
|
||||
+ int b = qBlue ( *p++ ); \
|
||||
+ if ( b <= (255-(1<<(8-bbits))) && ((b<<bbits) & 255) \
|
||||
+ > thres) \
|
||||
+ b += (1<<(8-bbits)); \
|
||||
+ int pixel = (( r red_shift ) & red_mask ) \
|
||||
+ | (( g green_shift ) & green_mask ) \
|
||||
+ | (( b blue_shift ) & blue_mask );
|
||||
+
|
||||
+#define CYCLE(body) \
|
||||
+ for ( uint y=0; y<h; y++ ) { \
|
||||
+ uchar* src = image.scanLine( y ); \
|
||||
+ uchar* dst = newbits + xi->bytes_per_line*y; \
|
||||
+ QRgb* p = (QRgb *)src; \
|
||||
+ body \
|
||||
+ }
|
||||
+
|
||||
+ if ( dither_tc ) {
|
||||
+ switch ( mode ) {
|
||||
+ case BPP16_8_3_M3:
|
||||
+ CYCLE(
|
||||
+ Q_INT16* dst16 = (Q_INT16*)dst;
|
||||
+ for ( uint x=0; x<w; x++ ) {
|
||||
+ GET_PIXEL_DITHER_TC_OPT(<<8,<<3,>>3,0xf800,0x7e0,0x1f,5,6,5)
|
||||
+ *dst16++ = pixel;
|
||||
+ }
|
||||
+ )
|
||||
break;
|
||||
- case 17: // 16 bit LSB
|
||||
- for ( x=0; x<w; x++ ) {
|
||||
- GET_PIXEL_DITHER_TC
|
||||
- *dst++ = pixel;
|
||||
- *dst++ = pixel >> 8;
|
||||
- }
|
||||
+ case BPP16_7_2_M3:
|
||||
+ CYCLE(
|
||||
+ Q_INT16* dst16 = (Q_INT16*)dst;
|
||||
+ for ( uint x=0; x<w; x++ ) {
|
||||
+ GET_PIXEL_DITHER_TC_OPT(<<7,<<2,>>3,0x7c00,0x3e0,0x1f,5,5,5)
|
||||
+ *dst16++ = pixel;
|
||||
+ }
|
||||
+ )
|
||||
+ break;
|
||||
+ case BPP16_MSB: // 16 bit MSB
|
||||
+ CYCLE(
|
||||
+ for ( uint x=0; x<w; x++ ) {
|
||||
+ GET_PIXEL_DITHER_TC
|
||||
+ *dst++ = (pixel >> 8);
|
||||
+ *dst++ = pixel;
|
||||
+ }
|
||||
+ )
|
||||
+ break;
|
||||
+ case BPP16_LSB: // 16 bit LSB
|
||||
+ CYCLE(
|
||||
+ for ( uint x=0; x<w; x++ ) {
|
||||
+ GET_PIXEL_DITHER_TC
|
||||
+ *dst++ = pixel;
|
||||
+ *dst++ = pixel >> 8;
|
||||
+ }
|
||||
+ )
|
||||
break;
|
||||
default:
|
||||
qFatal("Logic error");
|
||||
}
|
||||
- } else {
|
||||
- uint x;
|
||||
- switch ( bppc ) {
|
||||
- case 8: // 8 bit
|
||||
- for ( x=0; x<w; x++ ) {
|
||||
- int pixel = pix[*src++];
|
||||
- *dst++ = pixel;
|
||||
- }
|
||||
+ } else {
|
||||
+ switch ( mode ) {
|
||||
+ case BPP8: // 8 bit
|
||||
+ CYCLE(
|
||||
+ Q_UNUSED(p);
|
||||
+ for ( uint x=0; x<w; x++ ) {
|
||||
+ int pixel = pix[*src++];
|
||||
+ *dst++ = pixel;
|
||||
+ }
|
||||
+ )
|
||||
break;
|
||||
- case 16: // 16 bit MSB
|
||||
- for ( x=0; x<w; x++ ) {
|
||||
- GET_PIXEL
|
||||
- *dst++ = (pixel >> 8);
|
||||
- *dst++ = pixel;
|
||||
- }
|
||||
+ case BPP16_8_3_M3:
|
||||
+ CYCLE(
|
||||
+ Q_INT16* dst16 = (Q_INT16*)dst;
|
||||
+ for ( uint x=0; x<w; x++ ) {
|
||||
+ GET_PIXEL_OPT(<<8,<<3,>>3,0xf800,0x7e0,0x1f)
|
||||
+ *dst16++ = pixel;
|
||||
+ }
|
||||
+ )
|
||||
break;
|
||||
- case 17: // 16 bit LSB
|
||||
- for ( x=0; x<w; x++ ) {
|
||||
- GET_PIXEL
|
||||
- *dst++ = pixel;
|
||||
- *dst++ = pixel >> 8;
|
||||
- }
|
||||
+ case BPP16_7_2_M3:
|
||||
+ CYCLE(
|
||||
+ Q_INT16* dst16 = (Q_INT16*)dst;
|
||||
+ for ( uint x=0; x<w; x++ ) {
|
||||
+ GET_PIXEL_OPT(<<7,<<2,>>3,0x7c00,0x3e0,0x1f)
|
||||
+ *dst16++ = pixel;
|
||||
+ }
|
||||
+ )
|
||||
break;
|
||||
- case 24: // 24 bit MSB
|
||||
- for ( x=0; x<w; x++ ) {
|
||||
- GET_PIXEL
|
||||
- *dst++ = pixel >> 16;
|
||||
- *dst++ = pixel >> 8;
|
||||
- *dst++ = pixel;
|
||||
- }
|
||||
+ case BPP16_MSB: // 16 bit MSB
|
||||
+ CYCLE(
|
||||
+ for ( uint x=0; x<w; x++ ) {
|
||||
+ GET_PIXEL
|
||||
+ *dst++ = (pixel >> 8);
|
||||
+ *dst++ = pixel;
|
||||
+ }
|
||||
+ )
|
||||
break;
|
||||
- case 25: // 24 bit LSB
|
||||
- for ( x=0; x<w; x++ ) {
|
||||
- GET_PIXEL
|
||||
- *dst++ = pixel;
|
||||
- *dst++ = pixel >> 8;
|
||||
- *dst++ = pixel >> 16;
|
||||
- }
|
||||
+ case BPP16_LSB: // 16 bit LSB
|
||||
+ CYCLE(
|
||||
+ for ( uint x=0; x<w; x++ ) {
|
||||
+ GET_PIXEL
|
||||
+ *dst++ = pixel;
|
||||
+ *dst++ = pixel >> 8;
|
||||
+ }
|
||||
+ )
|
||||
break;
|
||||
- case 32: // 32 bit MSB
|
||||
- for ( x=0; x<w; x++ ) {
|
||||
- GET_PIXEL
|
||||
- *dst++ = pixel >> 24;
|
||||
- *dst++ = pixel >> 16;
|
||||
- *dst++ = pixel >> 8;
|
||||
- *dst++ = pixel;
|
||||
- }
|
||||
+ case BPP24_MSB: // 24 bit MSB
|
||||
+ CYCLE(
|
||||
+ for ( uint x=0; x<w; x++ ) {
|
||||
+ GET_PIXEL
|
||||
+ *dst++ = pixel >> 16;
|
||||
+ *dst++ = pixel >> 8;
|
||||
+ *dst++ = pixel;
|
||||
+ }
|
||||
+ )
|
||||
break;
|
||||
- case 33: // 32 bit LSB
|
||||
- for ( x=0; x<w; x++ ) {
|
||||
- GET_PIXEL
|
||||
- *dst++ = pixel;
|
||||
- *dst++ = pixel >> 8;
|
||||
- *dst++ = pixel >> 16;
|
||||
- *dst++ = pixel >> 24;
|
||||
- }
|
||||
+ case BPP24_LSB: // 24 bit LSB
|
||||
+ CYCLE(
|
||||
+ for ( uint x=0; x<w; x++ ) {
|
||||
+ GET_PIXEL
|
||||
+ *dst++ = pixel;
|
||||
+ *dst++ = pixel >> 8;
|
||||
+ *dst++ = pixel >> 16;
|
||||
+ }
|
||||
+ )
|
||||
break;
|
||||
- default:
|
||||
- qFatal("Logic error 2");
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- xi->data = (char *)newbits;
|
||||
+ case BPP32_16_8_0:
|
||||
+ CYCLE(
|
||||
+ memcpy( dst, p, w * 4 );
|
||||
+ )
|
||||
+ break;
|
||||
+ case BPP32_MSB: // 32 bit MSB
|
||||
+ CYCLE(
|
||||
+ for ( uint x=0; x<w; x++ ) {
|
||||
+ GET_PIXEL
|
||||
+ *dst++ = pixel >> 24;
|
||||
+ *dst++ = pixel >> 16;
|
||||
+ *dst++ = pixel >> 8;
|
||||
+ *dst++ = pixel;
|
||||
+ }
|
||||
+ )
|
||||
+ break;
|
||||
+ case BPP32_LSB: // 32 bit LSB
|
||||
+ CYCLE(
|
||||
+ for ( uint x=0; x<w; x++ ) {
|
||||
+ GET_PIXEL
|
||||
+ *dst++ = pixel;
|
||||
+ *dst++ = pixel >> 8;
|
||||
+ *dst++ = pixel >> 16;
|
||||
+ *dst++ = pixel >> 24;
|
||||
+ }
|
||||
+ )
|
||||
+ break;
|
||||
+ default:
|
||||
+ qFatal("Logic error 2");
|
||||
+ }
|
||||
+ }
|
||||
+ xi->data = (char *)newbits;
|
||||
}
|
||||
|
||||
if ( d == 8 && !trucol ) { // 8 bit pixmap
|
||||
@@ -1554,15 +1675,24 @@ bool QPixmap::convertFromImage( const QI
|
||||
|
||||
if (image.depth() == 32) {
|
||||
const int *iptr = (const int *) image.bits();
|
||||
- int max = w * h;
|
||||
- while (max--)
|
||||
- *aptr++ = *iptr++ >> 24; // squirt
|
||||
+ if( axi->bytes_per_line == (int)w ) {
|
||||
+ int max = w * h;
|
||||
+ while (max--)
|
||||
+ *aptr++ = *iptr++ >> 24; // squirt
|
||||
+ } else {
|
||||
+ for (uint i = 0; i < h; ++i ) {
|
||||
+ for (uint j = 0; j < w; ++j )
|
||||
+ *aptr++ = *iptr++ >> 24; // squirt
|
||||
+ aptr += ( axi->bytes_per_line - w );
|
||||
+ }
|
||||
+ }
|
||||
} else if (image.depth() == 8) {
|
||||
const QRgb * const rgb = image.colorTable();
|
||||
for (uint y = 0; y < h; ++y) {
|
||||
const uchar *iptr = image.scanLine(y);
|
||||
for (uint x = 0; x < w; ++x)
|
||||
*aptr++ = qAlpha(rgb[*iptr++]);
|
||||
+ aptr += ( axi->bytes_per_line - w );
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
--- src/kernel/qdragobject.cpp
|
||||
+++ src/kernel/qdragobject.cpp
|
||||
@@ -893,6 +893,16 @@
|
||||
{
|
||||
if(!e)
|
||||
return FALSE;
|
||||
+
|
||||
+ // when subtype is not specified, try text/plain first, otherwise this may read
|
||||
+ // things like text/x-moz-url even though better targets are available
|
||||
+ if( subtype.isNull()) {
|
||||
+ QCString subtmp = "plain";
|
||||
+ if( decode( e, str, subtmp )) {
|
||||
+ subtype = subtmp;
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if ( e->cacheType == QMimeSource::Text ) {
|
||||
str = *e->cache.txt.str;
|
@ -0,0 +1,23 @@
|
||||
qt-bugs@ issue: N46882
|
||||
bugs.kde.org number: 77545
|
||||
applied: no
|
||||
author: Stephan Binner <binner@kde.org>
|
||||
|
||||
Fix wrong K menu width for the case of enabled side pixmap and a menu title
|
||||
(like "Recently Used Applications") being longer than every other entry.
|
||||
|
||||
Solution: Respect PanelKMenu::setMaximumSize() as up to Qt 3.2.3
|
||||
|
||||
Index: src/widgets/qpopupmenu.cpp
|
||||
================================================================================
|
||||
--- src/widgets/qpopupmenu.cpp
|
||||
+++ src/widgets/qpopupmenu.cpp
|
||||
@@ -2530,7 +2530,7 @@
|
||||
constPolish();
|
||||
QPopupMenu* that = (QPopupMenu*) this;
|
||||
//We do not need a resize here, just the sizeHint..
|
||||
- return that->updateSize(FALSE, FALSE).expandedTo( QApplication::globalStrut() );
|
||||
+ return that->updateSize(FALSE).expandedTo( QApplication::globalStrut() );
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,51 @@
|
||||
qt-bugs@ issue : none, probably even won't be
|
||||
bugs.kde.org number : 80072
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
A crude hack for KDE #80072. No good idea how to fix it properly yet :(.
|
||||
|
||||
================================================================================
|
||||
Index: src/kernel/qclipboard_x11.cpp
|
||||
===================================================================
|
||||
--- src/kernel/qclipboard_x11.cpp.orig
|
||||
+++ src/kernel/qclipboard_x11.cpp
|
||||
@@ -112,6 +112,7 @@ static int pending_timer_id = 0;
|
||||
static bool pending_clipboard_changed = FALSE;
|
||||
static bool pending_selection_changed = FALSE;
|
||||
|
||||
+Q_EXPORT bool qt_qclipboard_bailout_hack = false;
|
||||
|
||||
// event capture mechanism for qt_xclb_wait_for_event
|
||||
static bool waiting_for_data = FALSE;
|
||||
@@ -464,6 +465,15 @@ static Bool checkForClipboardEvents(Disp
|
||||
|| e->xselectionclear.selection == qt_xa_clipboard)));
|
||||
}
|
||||
|
||||
+static bool selection_request_pending = false;
|
||||
+
|
||||
+static Bool check_selection_request_pending( Display*, XEvent* e, XPointer )
|
||||
+ {
|
||||
+ if( e->type == SelectionRequest && e->xselectionrequest.owner == owner->winId())
|
||||
+ selection_request_pending = true;
|
||||
+ return False;
|
||||
+ }
|
||||
+
|
||||
bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
|
||||
int timeout )
|
||||
{
|
||||
@@ -515,6 +525,14 @@ bool qt_xclb_wait_for_event( Display *dp
|
||||
do {
|
||||
if ( XCheckTypedWindowEvent(dpy,win,type,event) )
|
||||
return TRUE;
|
||||
+ if( qt_qclipboard_bailout_hack ) {
|
||||
+ XEvent dummy;
|
||||
+ selection_request_pending = false;
|
||||
+ if ( owner != NULL )
|
||||
+ XCheckIfEvent(dpy,&dummy,check_selection_request_pending,NULL);
|
||||
+ if( selection_request_pending )
|
||||
+ return TRUE;
|
||||
+ }
|
||||
|
||||
// process other clipboard events, since someone is probably requesting data from us
|
||||
XEvent e;
|
@ -0,0 +1,39 @@
|
||||
qt-bugs@ issue :
|
||||
bugs.kde.org number :
|
||||
applied: yes
|
||||
author: Waldo Bastian <bastian@kde.org>
|
||||
|
||||
QTextEdit::zoomIn /QTextEdit::zoomOut does not work if the original
|
||||
font had its size specified in pixels instead of points.
|
||||
pointSize() returns 0 in such case.
|
||||
|
||||
Index: widgets/qtextedit.cpp
|
||||
================================================================================
|
||||
--- src/widgets/qtextedit.cpp
|
||||
+++ src/widgets/qtextedit.cpp
|
||||
@@ -5767,7 +5767,11 @@
|
||||
void QTextEdit::zoomIn( int range )
|
||||
{
|
||||
QFont f( QScrollView::font() );
|
||||
- f.setPointSize( QFontInfo(f).pointSize() + range );
|
||||
+ QFontInfo fi(f);
|
||||
+ if (fi.pointSize() <= 0)
|
||||
+ f.setPixelSize( fi.pixelSize() + range );
|
||||
+ else
|
||||
+ f.setPointSize( fi.pointSize() + range );
|
||||
setFont( f );
|
||||
}
|
||||
|
||||
@@ -5782,7 +5786,11 @@
|
||||
void QTextEdit::zoomOut( int range )
|
||||
{
|
||||
QFont f( QScrollView::font() );
|
||||
- f.setPointSize( QMAX( 1, QFontInfo(f).pointSize() - range ) );
|
||||
+ QFontInfo fi(f);
|
||||
+ if (fi.pointSize() <= 0)
|
||||
+ f.setPixelSize( QMAX( 1, fi.pixelSize() - range ) );
|
||||
+ else
|
||||
+ f.setPointSize( QMAX( 1, fi.pointSize() - range ) );
|
||||
setFont( f );
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
qt-bugs@ issue : 58251
|
||||
bugs.kde.org number : 84434
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
Fixes keyboard input action in KHotKeys (see bug #84434).
|
||||
|
||||
================================================================================
|
||||
--- src/kernel/qapplication_x11.cpp
|
||||
+++ src/kernel/qapplication_x11.cpp
|
||||
@@ -5401,8 +5401,10 @@
|
||||
qt_auto_repeat_data *d = (qt_auto_repeat_data *) arg;
|
||||
if (d->error ||
|
||||
event->xkey.window != d->window ||
|
||||
- event->xkey.keycode != d->keycode)
|
||||
+ event->xkey.keycode != d->keycode) {
|
||||
+ d->error = TRUE;
|
||||
return FALSE;
|
||||
+ }
|
||||
|
||||
if (event->type == XKeyPress) {
|
||||
d->error = (! d->release || event->xkey.time - d->timestamp > 10);
|
@ -0,0 +1,69 @@
|
||||
qt-bugs@ issue : 49417
|
||||
bugs.kde.org number : 58719
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
Hello,
|
||||
|
||||
please consider applying the two attached QPopupMenu patches fixing KDE bugs
|
||||
#58719 and #74778 (http://bugs.kde.org/show_bug.cgi?id=58719,
|
||||
http://bugs.kde.org/show_bug.cgi?id=74778), which complain about keyboard
|
||||
navigation in popup menus being very uncomfortable because of being affected
|
||||
by mouse position despite mouse not being used at all.
|
||||
|
||||
- hasmouse.patch - (#58719) - use keyboard to open and navigate in any popup
|
||||
menu and "accidentally" hit your mouse. Depending on the mouse cursor
|
||||
position either no popup entry is selected or the random popup entry
|
||||
happening to be at the cursor position becomes highlighted. The patch
|
||||
basically copies the 'hasmouse' code from QMenuBar which prevents the mouse
|
||||
having any effect on the popup if it's outside the popup geometry.
|
||||
|
||||
[ ... #74778 ... ]
|
||||
|
||||
================================================================================
|
||||
--- src/widgets/qpopupmenu.cpp
|
||||
+++ src/widgets/qpopupmenu.cpp
|
||||
@@ -253,6 +253,7 @@
|
||||
} scroll;
|
||||
QSize calcSize;
|
||||
QRegion mouseMoveBuffer;
|
||||
+ uint hasmouse : 1;
|
||||
};
|
||||
|
||||
static QPopupMenu* active_popup_menu = 0;
|
||||
@@ -272,6 +273,7 @@
|
||||
d->scroll.scrollableSize = d->scroll.topScrollableIndex = 0;
|
||||
d->scroll.scrollable = QPopupMenuPrivate::Scroll::ScrollNone;
|
||||
d->scroll.scrolltimer = 0;
|
||||
+ d->hasmouse = 0;
|
||||
isPopupMenu = TRUE;
|
||||
#ifndef QT_NO_ACCEL
|
||||
autoaccel = 0;
|
||||
@@ -1741,6 +1743,11 @@
|
||||
|
||||
int item = itemAtPos( e->pos() );
|
||||
if ( item == -1 ) { // no valid item
|
||||
+ if( !d->hasmouse ) {
|
||||
+ tryMenuBar( e );
|
||||
+ return;
|
||||
+ }
|
||||
+ d->hasmouse = 0;
|
||||
int lastActItem = actItem;
|
||||
actItem = -1;
|
||||
if ( lastActItem >= 0 )
|
||||
@@ -1752,6 +1759,7 @@
|
||||
}
|
||||
} else { // mouse on valid item
|
||||
// but did not register mouse press
|
||||
+ d->hasmouse = 1;
|
||||
if ( (e->state() & Qt::MouseButtonMask) && !mouseBtDn )
|
||||
mouseBtDn = TRUE; // so mouseReleaseEvent will pop down
|
||||
|
||||
@@ -2160,6 +2168,7 @@
|
||||
*/
|
||||
void QPopupMenu::leaveEvent( QEvent * )
|
||||
{
|
||||
+ d->hasmouse = 0;
|
||||
if ( testWFlags( WStyle_Tool ) && style().styleHint(QStyle::SH_PopupMenu_MouseTracking, this) ) {
|
||||
int lastActItem = actItem;
|
||||
actItem = -1;
|
@ -0,0 +1,60 @@
|
||||
qt-bugs@ issue : 49417
|
||||
bugs.kde.org number : 74778
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
Hello,
|
||||
|
||||
please consider applying the two attached QPopupMenu patches fixing KDE bugs
|
||||
#58719 and #74778 (http://bugs.kde.org/show_bug.cgi?id=58719,
|
||||
http://bugs.kde.org/show_bug.cgi?id=74778), which complain about keyboard
|
||||
navigation in popup menus being very uncomfortable because of being affected
|
||||
by mouse position despite mouse not being used at all.
|
||||
|
||||
[... #58719 ... ]
|
||||
|
||||
- ignoremousepos.patch - (#74778) - use keyboard to open some popup which
|
||||
doesn't show up at mouse position (e.g. Alt+F3 with KWin or the context menu
|
||||
key with some file selected in Konqueror). If the mouse is positioned in the
|
||||
area where the popup shows, the random entry happening to be at the cursor
|
||||
position becomes highlighted.
|
||||
The patch fixes this by ignoring mouse events that happen at mouse position
|
||||
which was current when the popup was shown, i.e. all mouse move events that
|
||||
actually aren't triggered by mouse move are ignored. I first wanted to ignore
|
||||
only the very first mouse move event (which should be caused by EnterNotify
|
||||
for the popup) but I realized that Qt's event handling causes the popup to
|
||||
possibly get more than just one initial move event, caused by LeaveNotify
|
||||
events for normal widgets being transformed to mouse move events for the
|
||||
popup, so I have no better idea how to solve this problem.
|
||||
|
||||
================================================================================
|
||||
--- src/widgets/qpopupmenu.cpp
|
||||
+++ src/widgets/qpopupmenu.cpp
|
||||
@@ -254,6 +254,7 @@
|
||||
QSize calcSize;
|
||||
QRegion mouseMoveBuffer;
|
||||
uint hasmouse : 1;
|
||||
+ QPoint ignoremousepos;
|
||||
};
|
||||
|
||||
static QPopupMenu* active_popup_menu = 0;
|
||||
@@ -1356,6 +1357,7 @@
|
||||
popupActive = -1;
|
||||
if(style().styleHint(QStyle::SH_PopupMenu_SubMenuPopupDelay, this))
|
||||
d->mouseMoveBuffer = QRegion();
|
||||
+ d->ignoremousepos = QCursor::pos();
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -1703,6 +1705,11 @@
|
||||
|
||||
void QPopupMenu::mouseMoveEvent( QMouseEvent *e )
|
||||
{
|
||||
+ if( e->globalPos() == d->ignoremousepos ) {
|
||||
+ return;
|
||||
+ }
|
||||
+ d->ignoremousepos = QPoint();
|
||||
+
|
||||
motion++;
|
||||
|
||||
if ( parentMenu && parentMenu->isPopupMenu ) {
|
@ -0,0 +1,413 @@
|
||||
qt-bugs@ issue : none
|
||||
bugs.kde.org number : none
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
This patch adds support for window types used for compositing (popup menu, dropdown menu,
|
||||
tooltip, combobox, dnd).
|
||||
|
||||
--- src/kernel/qdnd_x11.cpp.sav 2007-05-25 18:56:23.000000000 +0200
|
||||
+++ src/kernel/qdnd_x11.cpp 2007-05-31 10:30:58.000000000 +0200
|
||||
@@ -261,6 +261,7 @@ public:
|
||||
QWidget(QApplication::desktop()->screen( screen ),
|
||||
0, WStyle_Customize | WStyle_Tool | WStyle_NoBorder | WX11BypassWM ), oldpmser( 0 ), oldbmser( 0 )
|
||||
{
|
||||
+ x11SetWindowType( X11WindowTypeDND );
|
||||
}
|
||||
|
||||
void setPixmap(QPixmap pm, QPoint hot)
|
||||
@@ -1221,6 +1222,7 @@ void QDragManager::move( const QPoint &
|
||||
// recreate the pixmap on the new screen...
|
||||
delete qt_xdnd_deco;
|
||||
qt_xdnd_deco = new QShapedPixmapWidget( screen );
|
||||
+ qt_xdnd_deco->x11SetWindowTransient( dragSource->topLevelWidget());
|
||||
if (!QWidget::mouseGrabber()) {
|
||||
updatePixmap();
|
||||
qt_xdnd_deco->grabMouse();
|
||||
@@ -1774,6 +1776,7 @@ bool QDragManager::drag( QDragObject * o
|
||||
|
||||
dragSource = (QWidget *)(object->parent());
|
||||
|
||||
+ qt_xdnd_deco->x11SetWindowTransient( dragSource->topLevelWidget());
|
||||
qApp->installEventFilter( this );
|
||||
qt_xdnd_source_current_time = qt_x_time;
|
||||
XSetSelectionOwner( QPaintDevice::x11AppDisplay(), qt_xdnd_selection,
|
||||
--- src/kernel/qapplication_x11.cpp.sav 2007-05-29 16:24:58.000000000 +0200
|
||||
+++ src/kernel/qapplication_x11.cpp 2007-05-31 10:30:58.000000000 +0200
|
||||
@@ -268,6 +268,11 @@ Atom qt_net_wm_window_type_menu = 0;
|
||||
Atom qt_net_wm_window_type_utility = 0;
|
||||
Atom qt_net_wm_window_type_splash = 0;
|
||||
Atom qt_net_wm_window_type_override = 0; // KDE extension
|
||||
+Atom qt_net_wm_window_type_dropdown_menu = 0;
|
||||
+Atom qt_net_wm_window_type_popup_menu = 0;
|
||||
+Atom qt_net_wm_window_type_tooltip = 0;
|
||||
+Atom qt_net_wm_window_type_combo = 0;
|
||||
+Atom qt_net_wm_window_type_dnd = 0;
|
||||
Atom qt_net_wm_frame_strut = 0; // KDE extension
|
||||
Atom qt_net_wm_state_stays_on_top = 0; // KDE extension
|
||||
Atom qt_net_wm_pid = 0;
|
||||
@@ -1920,6 +1925,11 @@ void qt_init_internal( int *argcptr, cha
|
||||
qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_UTILITY", &qt_net_wm_window_type_utility );
|
||||
qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_SPLASH", &qt_net_wm_window_type_splash );
|
||||
qt_x11_intern_atom( "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE", &qt_net_wm_window_type_override );
|
||||
+ qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU", &qt_net_wm_window_type_dropdown_menu );
|
||||
+ qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_POPUP_MENU", &qt_net_wm_window_type_popup_menu );
|
||||
+ qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_TOOLTIP", &qt_net_wm_window_type_tooltip );
|
||||
+ qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_COMBO", &qt_net_wm_window_type_combo );
|
||||
+ qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DND", &qt_net_wm_window_type_dnd );
|
||||
qt_x11_intern_atom( "_KDE_NET_WM_FRAME_STRUT", &qt_net_wm_frame_strut );
|
||||
qt_x11_intern_atom( "_NET_WM_STATE_STAYS_ON_TOP",
|
||||
&qt_net_wm_state_stays_on_top );
|
||||
--- src/kernel/qwidget_x11.cpp.sav 2007-05-25 18:56:23.000000000 +0200
|
||||
+++ src/kernel/qwidget_x11.cpp 2007-05-31 10:30:58.000000000 +0200
|
||||
@@ -125,6 +125,11 @@ extern Atom qt_net_wm_window_type_menu;
|
||||
extern Atom qt_net_wm_window_type_utility;
|
||||
extern Atom qt_net_wm_window_type_splash;
|
||||
extern Atom qt_net_wm_window_type_override;
|
||||
+extern Atom qt_net_wm_window_type_dropdown_menu;
|
||||
+extern Atom qt_net_wm_window_type_popup_menu;
|
||||
+extern Atom qt_net_wm_window_type_combo;
|
||||
+extern Atom qt_net_wm_window_type_dnd;
|
||||
+extern Atom qt_net_wm_window_type_tooltip;
|
||||
extern Atom qt_net_wm_pid;
|
||||
extern Atom qt_net_wm_user_time;
|
||||
extern Atom qt_enlightenment_desktop;
|
||||
@@ -448,10 +453,6 @@ void QWidget::create( WId window, bool i
|
||||
x11Colormap() );
|
||||
#endif // QT_NO_XFTFREETYPE
|
||||
|
||||
- // NET window types
|
||||
- long net_wintypes[7] = { 0, 0, 0, 0, 0, 0, 0 };
|
||||
- int curr_wintype = 0;
|
||||
-
|
||||
// NET window states
|
||||
long net_winstates[6] = { 0, 0, 0, 0, 0, 0 };
|
||||
int curr_winstate = 0;
|
||||
@@ -473,7 +474,6 @@ void QWidget::create( WId window, bool i
|
||||
if ( testWFlags(WStyle_Splash) ) {
|
||||
if (qt_net_supports(qt_net_wm_window_type_splash)) {
|
||||
clearWFlags( WX11BypassWM );
|
||||
- net_wintypes[curr_wintype++] = qt_net_wm_window_type_splash;
|
||||
} else {
|
||||
setWFlags( WX11BypassWM | WStyle_Tool | WStyle_NoBorder );
|
||||
}
|
||||
@@ -482,27 +482,22 @@ void QWidget::create( WId window, bool i
|
||||
mwmhints.decorations = 0L;
|
||||
mwmhints.flags |= (1L << 1); // MWM_HINTS_DECORATIONS
|
||||
|
||||
- if ( testWFlags( WStyle_NoBorder ) ) {
|
||||
- // override netwm type - quick and easy for KDE noborder
|
||||
- net_wintypes[curr_wintype++] = qt_net_wm_window_type_override;
|
||||
- } else {
|
||||
- if ( testWFlags( WStyle_NormalBorder | WStyle_DialogBorder ) ) {
|
||||
- mwmhints.decorations |= (1L << 1); // MWM_DECOR_BORDER
|
||||
- mwmhints.decorations |= (1L << 2); // MWM_DECOR_RESIZEH
|
||||
- }
|
||||
+ if ( testWFlags( WStyle_NormalBorder | WStyle_DialogBorder ) ) {
|
||||
+ mwmhints.decorations |= (1L << 1); // MWM_DECOR_BORDER
|
||||
+ mwmhints.decorations |= (1L << 2); // MWM_DECOR_RESIZEH
|
||||
+ }
|
||||
|
||||
- if ( testWFlags( WStyle_Title ) )
|
||||
- mwmhints.decorations |= (1L << 3); // MWM_DECOR_TITLE
|
||||
+ if ( testWFlags( WStyle_Title ) )
|
||||
+ mwmhints.decorations |= (1L << 3); // MWM_DECOR_TITLE
|
||||
|
||||
- if ( testWFlags( WStyle_SysMenu ) )
|
||||
- mwmhints.decorations |= (1L << 4); // MWM_DECOR_MENU
|
||||
+ if ( testWFlags( WStyle_SysMenu ) )
|
||||
+ mwmhints.decorations |= (1L << 4); // MWM_DECOR_MENU
|
||||
|
||||
- if ( testWFlags( WStyle_Minimize ) )
|
||||
- mwmhints.decorations |= (1L << 5); // MWM_DECOR_MINIMIZE
|
||||
+ if ( testWFlags( WStyle_Minimize ) )
|
||||
+ mwmhints.decorations |= (1L << 5); // MWM_DECOR_MINIMIZE
|
||||
|
||||
- if ( testWFlags( WStyle_Maximize ) )
|
||||
- mwmhints.decorations |= (1L << 6); // MWM_DECOR_MAXIMIZE
|
||||
- }
|
||||
+ if ( testWFlags( WStyle_Maximize ) )
|
||||
+ mwmhints.decorations |= (1L << 6); // MWM_DECOR_MAXIMIZE
|
||||
|
||||
if (testWFlags(WStyle_Tool)) {
|
||||
wsa.save_under = True;
|
||||
@@ -522,23 +517,6 @@ void QWidget::create( WId window, bool i
|
||||
}
|
||||
}
|
||||
|
||||
- // ### need a better way to do this
|
||||
- if (inherits("QPopupMenu")) {
|
||||
- // menu netwm type
|
||||
- net_wintypes[curr_wintype++] = qt_net_wm_window_type_menu;
|
||||
- } else if (inherits("QToolBar")) {
|
||||
- // toolbar netwm type
|
||||
- net_wintypes[curr_wintype++] = qt_net_wm_window_type_toolbar;
|
||||
- } else if (testWFlags(WStyle_Customize) && testWFlags(WStyle_Tool)) {
|
||||
- // utility netwm type
|
||||
- net_wintypes[curr_wintype++] = qt_net_wm_window_type_utility;
|
||||
- }
|
||||
-
|
||||
- if (dialog) // dialog netwm type
|
||||
- net_wintypes[curr_wintype++] = qt_net_wm_window_type_dialog;
|
||||
- // normal netwm type - default
|
||||
- net_wintypes[curr_wintype++] = qt_net_wm_window_type_normal;
|
||||
-
|
||||
// stays on top
|
||||
if (testWFlags(WStyle_StaysOnTop)) {
|
||||
net_winstates[curr_winstate++] = qt_net_wm_state_above;
|
||||
@@ -573,6 +551,7 @@ void QWidget::create( WId window, bool i
|
||||
wsa.save_under = True;
|
||||
XChangeWindowAttributes( dpy, id, CWOverrideRedirect | CWSaveUnder,
|
||||
&wsa );
|
||||
+ x11SetWindowType();
|
||||
} else if ( topLevel && !desktop ) { // top-level widget
|
||||
QWidget *p = parentWidget(); // real parent
|
||||
if (p)
|
||||
@@ -632,12 +611,7 @@ void QWidget::create( WId window, bool i
|
||||
else
|
||||
XDeleteProperty(dpy, id, qt_xa_motif_wm_hints);
|
||||
|
||||
- // set _NET_WM_WINDOW_TYPE
|
||||
- if (curr_wintype > 0)
|
||||
- XChangeProperty(dpy, id, qt_net_wm_window_type, XA_ATOM, 32, PropModeReplace,
|
||||
- (unsigned char *) net_wintypes, curr_wintype);
|
||||
- else
|
||||
- XDeleteProperty(dpy, id, qt_net_wm_window_type);
|
||||
+ x11SetWindowType();
|
||||
|
||||
// set _NET_WM_WINDOW_STATE
|
||||
if (curr_winstate > 0)
|
||||
@@ -896,6 +870,64 @@ void QWidget::reparentSys( QWidget *pare
|
||||
setMouseTracking(mouse_tracking);
|
||||
}
|
||||
|
||||
+// Sets the EWMH (netwm) window type. Needed as a separate function
|
||||
+// because create() may be too soon in some cases.
|
||||
+void QWidget::x11SetWindowType( X11WindowType type )
|
||||
+{
|
||||
+ // NET window types
|
||||
+ long net_wintypes[7] = { 0, 0, 0, 0, 0, 0, 0 };
|
||||
+ int curr_wintype = 0;
|
||||
+ if( testWFlags(WType_Desktop))
|
||||
+ return;
|
||||
+ if( type == X11WindowTypeSelect ) {
|
||||
+ if ( testWFlags(WStyle_Splash)) {
|
||||
+ if (qt_net_supports(qt_net_wm_window_type_splash)) {
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_splash;
|
||||
+ }
|
||||
+ } else if (inherits("QToolBar")) {
|
||||
+ // toolbar netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_toolbar;
|
||||
+ } else if (testWFlags(WStyle_Customize) && testWFlags(WStyle_Tool)) {
|
||||
+ // utility netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_utility;
|
||||
+ } else if (testWFlags(WType_Dialog)) {
|
||||
+ // dialog netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_dialog;
|
||||
+ }
|
||||
+ } else if( type == X11WindowTypeCombo ) {
|
||||
+ // combo netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_combo;
|
||||
+ } else if( type == X11WindowTypeDND ) {
|
||||
+ // dnd netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_dnd;
|
||||
+ } else if( type == X11WindowTypeDropdown ) {
|
||||
+ // dropdown netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_dropdown_menu;
|
||||
+ } else if( type == X11WindowTypePopup ) {
|
||||
+ // popup netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_popup_menu;
|
||||
+ } else if( type == X11WindowTypeMenu ) {
|
||||
+ // menu netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_menu;
|
||||
+ } else if( type == X11WindowTypeTooltip ) {
|
||||
+ // tooltip netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_tooltip;
|
||||
+ }
|
||||
+
|
||||
+ // normal netwm type - default
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_normal;
|
||||
+ // set _NET_WM_WINDOW_TYPE
|
||||
+ if (curr_wintype > 0)
|
||||
+ XChangeProperty(x11Display(), winId(), qt_net_wm_window_type, XA_ATOM, 32, PropModeReplace,
|
||||
+ (unsigned char *) net_wintypes, curr_wintype);
|
||||
+ else
|
||||
+ XDeleteProperty(x11Display(), winId(), qt_net_wm_window_type);
|
||||
+}
|
||||
+
|
||||
+void QWidget::x11SetWindowTransient( QWidget* parent )
|
||||
+{
|
||||
+ XSetTransientForHint( x11Display(), winId(), parent->winId());
|
||||
+}
|
||||
|
||||
/*!
|
||||
Translates the widget coordinate \a pos to global screen
|
||||
--- src/kernel/qwidget.h.sav 2007-05-25 18:56:23.000000000 +0200
|
||||
+++ src/kernel/qwidget.h 2007-05-31 10:30:58.000000000 +0200
|
||||
@@ -464,7 +464,19 @@ public:
|
||||
CGContextRef macCGContext(bool clipped=TRUE) const;
|
||||
#endif
|
||||
#endif
|
||||
-
|
||||
+#if defined(Q_WS_X11)
|
||||
+ enum X11WindowType {
|
||||
+ X11WindowTypeSelect,
|
||||
+ X11WindowTypeCombo,
|
||||
+ X11WindowTypeDND,
|
||||
+ X11WindowTypeTooltip,
|
||||
+ X11WindowTypeMenu, // torn-off
|
||||
+ X11WindowTypeDropdown,
|
||||
+ X11WindowTypePopup
|
||||
+ };
|
||||
+ void x11SetWindowType( X11WindowType type = X11WindowTypeSelect );
|
||||
+ void x11SetWindowTransient( QWidget* parent );
|
||||
+#endif
|
||||
void setWindowOpacity(double level);
|
||||
double windowOpacity() const;
|
||||
|
||||
--- src/dialogs/qdialog.cpp.sav 2007-05-25 18:56:23.000000000 +0200
|
||||
+++ src/dialogs/qdialog.cpp 2007-05-31 10:30:58.000000000 +0200
|
||||
@@ -705,7 +701,7 @@ void QDialog::show()
|
||||
&& qApp->mainWidget() && qApp->mainWidget()->isVisible()
|
||||
&& !qApp->mainWidget()->isMinimized()) {
|
||||
// make sure the transient for hint is set properly for modal dialogs
|
||||
- XSetTransientForHint( x11Display(), winId(), qApp->mainWidget()->winId() );
|
||||
+ x11SetWindowTransient( qApp->mainWidget());
|
||||
}
|
||||
#endif // Q_WS_X11
|
||||
|
||||
--- src/widgets/qtooltip.cpp.sav 2007-05-25 18:56:23.000000000 +0200
|
||||
+++ src/widgets/qtooltip.cpp 2007-05-31 10:30:58.000000000 +0200
|
||||
@@ -72,6 +72,7 @@ public:
|
||||
polish();
|
||||
setText(text);
|
||||
adjustSize();
|
||||
+ x11SetWindowType( X11WindowTypeTooltip );
|
||||
}
|
||||
void setWidth( int w ) { resize( sizeForWidth( w ) ); }
|
||||
};
|
||||
@@ -528,6 +529,10 @@ void QTipManager::showTip()
|
||||
if (!widget)
|
||||
return;
|
||||
|
||||
+#ifdef Q_WS_X11
|
||||
+ label->x11SetWindowTransient( widget->topLevelWidget());
|
||||
+#endif
|
||||
+
|
||||
#ifdef Q_WS_MAC
|
||||
QRect screen = QApplication::desktop()->availableGeometry( scr );
|
||||
#else
|
||||
--- src/widgets/qcombobox.cpp.sav 2007-05-25 18:56:23.000000000 +0200
|
||||
+++ src/widgets/qcombobox.cpp 2007-05-31 10:49:13.000000000 +0200
|
||||
@@ -389,12 +389,8 @@ public:
|
||||
inline QListBox * listBox() { return lBox; }
|
||||
inline QComboBoxPopup * popup() { return pop; }
|
||||
void updateLinedGeometry();
|
||||
-
|
||||
- void setListBox( QListBox *l ) { lBox = l ; usingLBox = TRUE;
|
||||
- l->setMouseTracking( TRUE );}
|
||||
-
|
||||
- void setPopupMenu( QComboBoxPopup * pm, bool isPopup=TRUE )
|
||||
- { pop = pm; if(isPopup) usingLBox = FALSE; }
|
||||
+ void setListBox( QListBox *l );
|
||||
+ void setPopupMenu( QComboBoxPopup * pm, bool isPopup=TRUE );
|
||||
|
||||
int current;
|
||||
int maxCount;
|
||||
@@ -440,6 +436,30 @@ void QComboBoxData::updateLinedGeometry(
|
||||
ed->setGeometry( r );
|
||||
}
|
||||
|
||||
+void QComboBoxData::setListBox( QListBox *l )
|
||||
+{
|
||||
+ lBox = l;
|
||||
+ usingLBox = TRUE;
|
||||
+ l->setMouseTracking( TRUE );
|
||||
+#ifdef Q_WS_X11
|
||||
+ l->x11SetWindowType( QWidget::X11WindowTypeCombo );
|
||||
+ l->x11SetWindowTransient( combo->topLevelWidget());
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+void QComboBoxData::setPopupMenu( QComboBoxPopup * pm, bool isPopup )
|
||||
+{
|
||||
+ pop = pm;
|
||||
+ if(isPopup)
|
||||
+ usingLBox = FALSE;
|
||||
+#ifdef Q_WS_X11
|
||||
+ if( pm ) {
|
||||
+ pm->x11SetWindowType( QWidget::X11WindowTypeCombo );
|
||||
+ pm->x11SetWindowTransient( combo->topLevelWidget());
|
||||
+ }
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
static inline bool checkInsertIndex( const char *method, const char * name,
|
||||
int count, int *index)
|
||||
{
|
||||
--- src/widgets/qpopupmenu.cpp.sav 2007-05-25 18:56:23.000000000 +0200
|
||||
+++ src/widgets/qpopupmenu.cpp 2007-05-31 11:09:22.000000000 +0200
|
||||
@@ -298,6 +298,9 @@ QPopupMenu::QPopupMenu( QWidget *parent,
|
||||
connectModalRecursionSafety = 0;
|
||||
|
||||
setFocusPolicy( StrongFocus );
|
||||
+#ifdef Q_WS_X11
|
||||
+ x11SetWindowType( X11WindowTypePopup );
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -537,6 +540,29 @@ void QPopupMenu::popup( const QPoint &po
|
||||
emit aboutToShow();
|
||||
updateSize(TRUE);
|
||||
}
|
||||
+#ifdef Q_WS_X11
|
||||
+#ifndef QT_NO_MENUBAR
|
||||
+ QMenuData *top = this; // find top level
|
||||
+ while ( top->parentMenu )
|
||||
+ top = top->parentMenu;
|
||||
+ if( top->isMenuBar )
|
||||
+ x11SetWindowType( X11WindowTypeDropdown );
|
||||
+ if( parentMenu && parentMenu->isMenuBar )
|
||||
+ x11SetWindowTransient( static_cast< QMenuBar* >( parentMenu )->topLevelWidget());
|
||||
+#endif
|
||||
+ if( parentMenu && !parentMenu->isMenuBar )
|
||||
+ x11SetWindowTransient( static_cast< QPopupMenu* >( parentMenu ));
|
||||
+ if( !parentMenu ) {
|
||||
+ // hackish ... try to find the main window related to this popup
|
||||
+ QWidget* parent = parentWidget() ? parentWidget()->topLevelWidget() : NULL;
|
||||
+ if( parent == NULL )
|
||||
+ parent = QApplication::widgetAt( pos );
|
||||
+ if( parent == NULL )
|
||||
+ parent = qApp->activeWindow();
|
||||
+ if( parent != NULL )
|
||||
+ x11SetWindowTransient( parent );
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
int sw = screen.width(); // screen width
|
||||
int sh = screen.height(); // screen height
|
||||
@@ -1390,6 +1416,13 @@ void QPopupMenu::hide()
|
||||
#if defined(QT_ACCESSIBILITY_SUPPORT)
|
||||
QAccessible::updateAccessibility( this, 0, QAccessible::PopupMenuEnd );
|
||||
#endif
|
||||
+#ifndef QT_NO_MENUBAR
|
||||
+ QMenuData *top = this; // find top level
|
||||
+ while ( top->parentMenu )
|
||||
+ top = top->parentMenu;
|
||||
+ if( top->isMenuBar )
|
||||
+ x11SetWindowType( X11WindowTypePopup ); // reset
|
||||
+#endif
|
||||
parentMenu = 0;
|
||||
hidePopups();
|
||||
QWidget::hide();
|
||||
@@ -2713,6 +2746,9 @@ void QPopupMenu::toggleTearOff()
|
||||
geometry().topLeft(), FALSE );
|
||||
p->mitems->setAutoDelete( FALSE );
|
||||
p->tornOff = TRUE;
|
||||
+#ifdef Q_WS_X11
|
||||
+ p->x11SetWindowType( X11WindowTypeMenu );
|
||||
+#endif
|
||||
for ( QMenuItemListIt it( *mitems ); it.current(); ++it ) {
|
||||
if ( it.current()->id() != QMenuData::d->aInt && !it.current()->widget() )
|
||||
p->mitems->append( it.current() );
|
@ -0,0 +1,301 @@
|
||||
This qt-copy patch has been slightly modified to apply to the SUSE package
|
||||
(does not apply directly because of the immodule patch).
|
||||
|
||||
--- src/kernel/qwidget_x11.cpp.sav 2007-08-29 15:04:42.000000000 +0200
|
||||
+++ src/kernel/qwidget_x11.cpp 2007-08-29 15:06:17.000000000 +0200
|
||||
@@ -85,6 +85,12 @@ static QWidget *keyboardGrb = 0;
|
||||
extern Time qt_x_time;
|
||||
extern Time qt_x_user_time;
|
||||
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+extern Atom qt_net_wm_sync_request_counter;
|
||||
+extern Atom qt_net_wm_sync_request;
|
||||
+extern bool qt_use_xsync;
|
||||
+#endif
|
||||
+
|
||||
// defined in qfont_x11.cpp
|
||||
extern bool qt_has_xft;
|
||||
|
||||
@@ -593,11 +599,14 @@ void QWidget::create( WId window, bool i
|
||||
|
||||
XResizeWindow( dpy, id, crect.width(), crect.height() );
|
||||
XStoreName( dpy, id, qAppName() );
|
||||
- Atom protocols[4];
|
||||
+ Atom protocols[5];
|
||||
int n = 0;
|
||||
protocols[n++] = qt_wm_delete_window; // support del window protocol
|
||||
protocols[n++] = qt_wm_take_focus; // support take focus window protocol
|
||||
protocols[n++] = qt_net_wm_ping; // support _NET_WM_PING protocol
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ protocols[n++] = qt_net_wm_sync_request;// support the _NET_WM_SYNC_REQUEST protocol
|
||||
+#endif
|
||||
if ( testWFlags( WStyle_ContextHelp ) )
|
||||
protocols[n++] = qt_net_wm_context_help;
|
||||
XSetWMProtocols( dpy, id, protocols, n );
|
||||
@@ -623,6 +632,14 @@ void QWidget::create( WId window, bool i
|
||||
XChangeProperty(dpy, id, qt_net_wm_pid, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *) &curr_pid, 1);
|
||||
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ // set _NET_WM_SYNC_COUNTER
|
||||
+ createSyncCounter();
|
||||
+ long counterVal = topData()->syncCounter;
|
||||
+ XChangeProperty( dpy, id, qt_net_wm_sync_request_counter, XA_CARDINAL, 32, PropModeReplace,
|
||||
+ (unsigned char*) &counterVal, 1);
|
||||
+#endif
|
||||
+
|
||||
// when we create a toplevel widget, the frame strut should be dirty
|
||||
fstrut_dirty = 1;
|
||||
|
||||
@@ -722,6 +739,9 @@ void QWidget::destroy( bool destroyWindo
|
||||
if ( destroyWindow )
|
||||
qt_XDestroyWindow( this, x11Display(), winid );
|
||||
}
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ destroySyncCounter();
|
||||
+#endif
|
||||
setWinId( 0 );
|
||||
|
||||
extern void qPRCleanup( QWidget *widget ); // from qapplication_x11.cpp
|
||||
@@ -781,6 +801,10 @@ void QWidget::reparentSys( QWidget *pare
|
||||
destroyInputContext();
|
||||
}
|
||||
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ destroySyncCounter();
|
||||
+#endif
|
||||
+
|
||||
if ( isTopLevel() || !parent ) // we are toplevel, or reparenting to toplevel
|
||||
topData()->parentWinId = 0;
|
||||
|
||||
@@ -2464,6 +2488,11 @@ void QWidget::createTLSysExtra()
|
||||
// created lazily
|
||||
extra->topextra->xic = 0;
|
||||
#endif
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ extra->topextra->syncCounter = 0;
|
||||
+ extra->topextra->syncRequestValue[0] = 0;
|
||||
+ extra->topextra->syncRequestValue[1] = 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
void QWidget::deleteTLSysExtra()
|
||||
@@ -2510,6 +2539,51 @@ void QWidget::checkChildrenDnd()
|
||||
}
|
||||
}
|
||||
|
||||
+
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+// create a window's XSyncCounter
|
||||
+void QWidget::createSyncCounter()
|
||||
+{
|
||||
+ if( !qt_use_xsync || !isTopLevel() || topData()->syncCounter )
|
||||
+ return;
|
||||
+ XSyncValue zero;
|
||||
+ XSyncIntToValue( &zero, 0 );
|
||||
+ topData()->syncCounter = XSyncCreateCounter( x11Display(), zero );
|
||||
+}
|
||||
+
|
||||
+// destroy a window's XSyncCounter
|
||||
+void QWidget::destroySyncCounter()
|
||||
+{
|
||||
+ if( !qt_use_xsync || !extra || !extra->topextra
|
||||
+ || !extra->topextra->syncCounter )
|
||||
+ return;
|
||||
+ XSyncDestroyCounter( x11Display(), extra->topextra->syncCounter );
|
||||
+ extra->topextra->syncCounter = 0;
|
||||
+}
|
||||
+
|
||||
+// increment a window's XSyncCounter
|
||||
+void QWidget::incrementSyncCounter()
|
||||
+{
|
||||
+ if( qt_use_xsync && topData()->syncCounter &&
|
||||
+ !(topData()->syncRequestValue[0] == 0 &&
|
||||
+ topData()->syncRequestValue[1] == 0) ) {
|
||||
+ XSyncValue val;
|
||||
+ XSyncIntsToValue( &val, topData()->syncRequestValue[ 0 ], topData()->syncRequestValue[ 1 ] );
|
||||
+ XSyncSetCounter( x11Display(), topData()->syncCounter, val );
|
||||
+ topData()->syncRequestValue[0] = topData()->syncRequestValue[1] = 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+// handle _NET_WM_SYNC_REQUEST
|
||||
+void QWidget::handleSyncRequest( void* ev )
|
||||
+{
|
||||
+ XEvent* xev = (XEvent*)ev;
|
||||
+ topData()->syncRequestValue[ 0 ] = xev->xclient.data.l[ 2 ];
|
||||
+ topData()->syncRequestValue[ 1 ] = xev->xclient.data.l[ 3 ];
|
||||
+}
|
||||
+#endif // QT_NO_XSYNC
|
||||
+
|
||||
+
|
||||
/*!
|
||||
\property QWidget::acceptDrops
|
||||
\brief whether drop events are enabled for this widget
|
||||
--- src/kernel/qt_x11_p.h.sav 2007-08-29 15:04:42.000000000 +0200
|
||||
+++ src/kernel/qt_x11_p.h 2007-08-29 15:05:27.000000000 +0200
|
||||
@@ -174,6 +174,11 @@ extern "C" {
|
||||
#endif // QT_NO_XRENDER
|
||||
|
||||
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+# include <X11/extensions/sync.h>
|
||||
+#endif // QT_NO_XSYNC
|
||||
+
|
||||
+
|
||||
#ifndef QT_NO_XKB
|
||||
# include <X11/XKBlib.h>
|
||||
#endif // QT_NO_XKB
|
||||
--- src/kernel/qwidget.h.sav 2007-08-29 15:04:42.000000000 +0200
|
||||
+++ src/kernel/qwidget.h 2007-08-29 15:05:52.000000000 +0200
|
||||
@@ -605,6 +605,14 @@ private:
|
||||
void focusInputContext();
|
||||
void unfocusInputContext();
|
||||
void checkChildrenDnd();
|
||||
+
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ void createSyncCounter();
|
||||
+ void destroySyncCounter();
|
||||
+ void incrementSyncCounter();
|
||||
+ void handleSyncRequest( void* ev );
|
||||
+#endif
|
||||
+
|
||||
#elif defined(Q_WS_MAC)
|
||||
uint own_id : 1, macDropEnabled : 1;
|
||||
EventHandlerRef window_event;
|
||||
@@ -986,6 +994,10 @@ struct Q_EXPORT QTLWExtra {
|
||||
#if defined(QT_NO_IM_EXTENSIONS)
|
||||
void *xic; // Input Context
|
||||
#endif
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ ulong syncCounter;
|
||||
+ uint syncRequestValue[2];
|
||||
+#endif
|
||||
#endif
|
||||
#if defined(Q_WS_MAC)
|
||||
WindowGroupRef group;
|
||||
--- src/kernel/qapplication_x11.cpp.sav 2007-08-29 15:04:42.000000000 +0200
|
||||
+++ src/kernel/qapplication_x11.cpp 2007-08-29 15:05:27.000000000 +0200
|
||||
@@ -288,6 +288,11 @@ Atom *qt_net_supported_list = 0;
|
||||
Window *qt_net_virtual_root_list = 0;
|
||||
|
||||
|
||||
+// X11 SYNC support
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+Atom qt_net_wm_sync_request_counter = 0;
|
||||
+Atom qt_net_wm_sync_request = 0;
|
||||
+#endif
|
||||
|
||||
// client leader window
|
||||
Window qt_x11_wm_client_leader = 0;
|
||||
@@ -312,6 +317,13 @@ static int xrandr_eventbase;
|
||||
// Display
|
||||
Q_EXPORT bool qt_use_xrender = FALSE;
|
||||
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+// True if SYNC extension exists on the connected display
|
||||
+bool qt_use_xsync = FALSE;
|
||||
+static int xsync_eventbase;
|
||||
+static int xsync_errorbase;
|
||||
+#endif
|
||||
+
|
||||
// modifier masks for alt/meta - detected when the application starts
|
||||
static long qt_alt_mask = 0;
|
||||
static long qt_meta_mask = 0;
|
||||
@@ -2007,6 +2019,11 @@ void qt_init_internal( int *argcptr, cha
|
||||
qt_x11_intern_atom( "UTF8_STRING", &qt_utf8_string );
|
||||
qt_x11_intern_atom( "_SGI_DESKS_MANAGER", &qt_sgi_desks_manager );
|
||||
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ qt_x11_intern_atom( "_NET_WM_SYNC_REQUEST_COUNTER", &qt_net_wm_sync_request_counter );
|
||||
+ qt_x11_intern_atom( "_NET_WM_SYNC_REQUEST", &qt_net_wm_sync_request );
|
||||
+#endif
|
||||
+
|
||||
qt_xdnd_setup();
|
||||
qt_x11_motifdnd_init();
|
||||
|
||||
@@ -2043,6 +2060,15 @@ void qt_init_internal( int *argcptr, cha
|
||||
}
|
||||
#endif // QT_NO_XRENDER
|
||||
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ // Try to initialize SYNC extension on the connected display
|
||||
+ int xsync_major, xsync_minor;
|
||||
+ if ( XSyncQueryExtension( appDpy, &xsync_eventbase, &xsync_errorbase ) &&
|
||||
+ XSyncInitialize( appDpy, &xsync_major, &xsync_minor ) ) {
|
||||
+ qt_use_xsync = TRUE;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
#ifndef QT_NO_XKB
|
||||
// If XKB is detected, set the GrabsUseXKBState option so input method
|
||||
// compositions continue to work (ie. deadkeys)
|
||||
@@ -3196,6 +3222,10 @@ int QApplication::x11ClientMessage(QWidg
|
||||
XSendEvent( event->xclient.display, event->xclient.window,
|
||||
False, SubstructureNotifyMask|SubstructureRedirectMask, event );
|
||||
}
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ } else if (a == qt_net_wm_sync_request ) {
|
||||
+ widget->handleSyncRequest( event );
|
||||
+#endif
|
||||
}
|
||||
} else if ( event->xclient.message_type == qt_qt_scrolldone ) {
|
||||
widget->translateScrollDoneEvent(event);
|
||||
@@ -5818,6 +5848,21 @@ bool QETWidget::translateScrollDoneEvent
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+#if defined(Q_C_CALLBACKS)
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+static Bool qt_net_wm_sync_request_scanner(Display*, XEvent* event, XPointer arg)
|
||||
+{
|
||||
+ return (event->type == ClientMessage && event->xclient.window == *(Window*)arg
|
||||
+ && event->xclient.message_type == qt_wm_protocols
|
||||
+ && event->xclient.data.l[ 0 ] == qt_net_wm_sync_request );
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#if defined(Q_C_CALLBACKS)
|
||||
+}
|
||||
+#endif
|
||||
|
||||
//
|
||||
// ConfigureNotify (window move and resize) event translation
|
||||
@@ -5849,6 +5894,7 @@ bool QETWidget::translateConfigEvent( co
|
||||
if (! extra || extra->compress_events) {
|
||||
// ConfigureNotify compression for faster opaque resizing
|
||||
XEvent otherEvent;
|
||||
+ int compressed_configs = 0;
|
||||
while ( XCheckTypedWindowEvent( x11Display(), winId(), ConfigureNotify,
|
||||
&otherEvent ) ) {
|
||||
if ( qt_x11EventFilter( &otherEvent ) )
|
||||
@@ -5869,7 +5915,18 @@ bool QETWidget::translateConfigEvent( co
|
||||
newCPos.ry() = otherEvent.xconfigure.y +
|
||||
otherEvent.xconfigure.border_width;
|
||||
}
|
||||
+ ++compressed_configs;
|
||||
+ }
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ // _NET_WM_SYNC_REQUEST compression
|
||||
+ Window wid = winId();
|
||||
+ while ( compressed_configs &&
|
||||
+ XCheckIfEvent( x11Display(), &otherEvent,
|
||||
+ qt_net_wm_sync_request_scanner, (XPointer)&wid ) ) {
|
||||
+ handleSyncRequest( (void*)&otherEvent );
|
||||
+ --compressed_configs;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
QRect cr ( geometry() );
|
||||
@@ -5923,6 +5980,8 @@ bool QETWidget::translateConfigEvent( co
|
||||
repaint( !testWFlags(WResizeNoErase) || transbg );
|
||||
}
|
||||
|
||||
+ incrementSyncCounter();
|
||||
+
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
--- configure
|
||||
+++ configure
|
||||
@@ -3140,15 +3140,15 @@ case "$COMPILER" in
|
||||
g++*)
|
||||
# GNU C++
|
||||
QMAKE_CONF_COMPILER=`grep "QMAKE_CXX[^_A-Z0-9a-z]" $QMAKESPEC/qmake.conf | sed "s,.* *= *\(.*\)$,\1,"`
|
||||
- COMPILER_VERSION=`${QMAKE_CONF_COMPILER} --version 2>/dev/null`
|
||||
+ COMPILER_VERSION=`${QMAKE_CONF_COMPILER} --version 2>/dev/null | sed 's,^[^0-9]*,,g'`
|
||||
case "$COMPILER_VERSION" in
|
||||
- *2.95.*)
|
||||
+ 2.95.*)
|
||||
COMPILER_VERSION="2.95.*"
|
||||
;;
|
||||
- *3.*)
|
||||
+ 3.*)
|
||||
COMPILER_VERSION="3.*"
|
||||
;;
|
||||
- *4.*)
|
||||
+ 4.*)
|
||||
COMPILER_VERSION="4"
|
||||
;;
|
||||
*)
|
@ -0,0 +1,63 @@
|
||||
Index: src/kernel/qgplugin.h
|
||||
================================================================================
|
||||
--- src/kernel/qgplugin.h
|
||||
+++ src/kernel/qgplugin.h
|
||||
@@ -90,35 +90,19 @@
|
||||
return i->iface(); \
|
||||
}
|
||||
|
||||
-# ifdef Q_WS_WIN
|
||||
-# ifdef Q_CC_BOR
|
||||
-# define Q_EXPORT_PLUGIN(PLUGIN) \
|
||||
- Q_PLUGIN_VERIFICATION_DATA \
|
||||
- Q_EXTERN_C __declspec(dllexport) \
|
||||
- const char * __stdcall qt_ucm_query_verification_data() \
|
||||
- { return qt_ucm_verification_data; } \
|
||||
- Q_EXTERN_C __declspec(dllexport) QUnknownInterface* \
|
||||
- __stdcall ucm_instantiate() \
|
||||
- Q_PLUGIN_INSTANTIATE( PLUGIN )
|
||||
-# else
|
||||
-# define Q_EXPORT_PLUGIN(PLUGIN) \
|
||||
- Q_PLUGIN_VERIFICATION_DATA \
|
||||
- Q_EXTERN_C __declspec(dllexport) \
|
||||
- const char *qt_ucm_query_verification_data() \
|
||||
- { return qt_ucm_verification_data; } \
|
||||
- Q_EXTERN_C __declspec(dllexport) QUnknownInterface* ucm_instantiate() \
|
||||
- Q_PLUGIN_INSTANTIATE( PLUGIN )
|
||||
-# endif
|
||||
-# else
|
||||
-# define Q_EXPORT_PLUGIN(PLUGIN) \
|
||||
+#if defined(Q_WS_WIN) && defined(Q_CC_BOR)
|
||||
+# define Q_STDCALL __stdcall
|
||||
+#else
|
||||
+# define Q_STDCALL
|
||||
+#endif
|
||||
+
|
||||
+#define Q_EXPORT_PLUGIN(PLUGIN) \
|
||||
Q_PLUGIN_VERIFICATION_DATA \
|
||||
- Q_EXTERN_C \
|
||||
- const char *qt_ucm_query_verification_data() \
|
||||
+ Q_EXTERN_C Q_EXPORT \
|
||||
+ const char * Q_STDCALL qt_ucm_query_verification_data() \
|
||||
{ return qt_ucm_verification_data; } \
|
||||
- Q_EXTERN_C QUnknownInterface* ucm_instantiate() \
|
||||
+ Q_EXTERN_C Q_EXPORT QUnknownInterface* Q_STDCALL ucm_instantiate() \
|
||||
Q_PLUGIN_INSTANTIATE( PLUGIN )
|
||||
-# endif
|
||||
-
|
||||
#endif
|
||||
|
||||
struct QUnknownInterface;
|
||||
--- src/tools/qglobal.h
|
||||
+++ src/tools/qglobal.h
|
||||
@@ -882,6 +882,10 @@
|
||||
# define Q_TEMPLATE_EXTERN
|
||||
# undef Q_DISABLE_COPY /* avoid unresolved externals */
|
||||
# endif
|
||||
+#elif defined(Q_CC_GNU) && __GNUC__ - 0 >= 4
|
||||
+# define Q_EXPORT __attribute__((visibility("default")))
|
||||
+# undef QT_MAKEDLL /* ignore these for other platforms */
|
||||
+# undef QT_DLL
|
||||
#else
|
||||
# undef QT_MAKEDLL /* ignore these for other platforms */
|
||||
# undef QT_DLL
|
@ -0,0 +1,11 @@
|
||||
--- src/qt.pro
|
||||
+++ src/qt.pro
|
||||
@@ -40,6 +40,8 @@
|
||||
XML_CPP = xml
|
||||
STYLES_CPP = styles
|
||||
EMBEDDED_CPP = embedded
|
||||
+QMAKE_CFLAGS += -fno-strict-aliasing
|
||||
+QMAKE_CFLAGS_MT += -fno-strict-aliasing
|
||||
|
||||
win32 {
|
||||
contains(QT_PRODUCT,qt-internal) {
|
@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Categories=Qt;Development;
|
||||
Encoding=UTF-8
|
||||
Exec=/usr/lib/qt3/bin/assistant
|
||||
Name=Qt Assistant
|
||||
GenericName=Document Browser
|
||||
X-KDE-StartupNotify=true
|
||||
Icon=assistant3
|
||||
Terminal=false
|
||||
Type=Application
|
After Width: | Height: | Size: 2.3 KiB |
@ -0,0 +1,72 @@
|
||||
summary.qt3 A library for developing applications with graphical user interfaces
|
||||
summary.qt3-devel Include Files and Libraries mandatory for Development
|
||||
summary.qt3-devel-doc Documentation for the Qt 3 Development Kit
|
||||
summary.qt3-devel-examples Programming Examples for Qt 3
|
||||
summary.qt3-devel-tools User Interface Builder and other tools (designer, assistant, linguist)
|
||||
summary.qt3-extensions Qt3 Extensions
|
||||
summary.qt3-man Qt 3 Man Pages
|
||||
summary.qt3-mysql MySQL Plug-In for Qt
|
||||
summary.qt3-postgresql A PostgreSQL Plug-In for Qt
|
||||
summary.qt3-sqlite SQLite Database Plug-In for Qt
|
||||
summary.qt3-unixODBC A UnixODBC Plug-In for Qt
|
||||
+description.qt3
|
||||
Qt is a program library for developing applications with graphical user
|
||||
interfaces. It allows you to rapidly develop professional programs. The
|
||||
Qt library is available not only for Linux but for a great number of
|
||||
Unices and even for Windows. Thus it is possible to write programs that
|
||||
may be easily ported to those platforms.
|
||||
|
||||
You need a license for using Qt with a non-GPL application, which can
|
||||
be acquired from sales@trolltech.com.
|
||||
|
||||
See /usr/share/doc/packages/qt3 for details about the new features of
|
||||
the current Qt library!
|
||||
-description.qt3
|
||||
+description.qt3-devel
|
||||
You need this package if you want to compile programs with Qt 3. It
|
||||
contains the "Qt Crossplatform Development Kit 2". Under /usr/lib/qt3
|
||||
you will find include files.
|
||||
|
||||
You need a license for using Qt with a non-GPL application. A license
|
||||
can be acquired at sales@trolltech.com.
|
||||
-description.qt3-devel
|
||||
+description.qt3-devel-doc
|
||||
This package contains the documentation for the Qt 3 Development Kit.
|
||||
|
||||
You will find documentation, precompiled examples, and a tutorial for
|
||||
getting started with Qt in /usr/lib/qt3/doc.
|
||||
-description.qt3-devel-doc
|
||||
+description.qt3-devel-examples
|
||||
This package contains small executables with code to demonstrate Qt
|
||||
programming.
|
||||
|
||||
Have a look in /usr/share/doc/packages/qt3/examples/.
|
||||
-description.qt3-devel-examples
|
||||
+description.qt3-devel-tools
|
||||
The designer creates .ui files. The uic generates C++ code from these
|
||||
files. The package also contains the Qt Assistant (Qt documentation
|
||||
browser) and the Qt Linguist (for translations).
|
||||
-description.qt3-devel-tools
|
||||
+description.qt3-extensions
|
||||
This package contains extension libraries for Qt 3, such as the
|
||||
Netscape plug-in modules.
|
||||
-description.qt3-extensions
|
||||
+description.qt3-man
|
||||
This package contains all the man pages for all the Qt 3 classes.
|
||||
-description.qt3-man
|
||||
+description.qt3-mysql
|
||||
Plug-in for using the MySQL database with the generic Qt database
|
||||
interface.
|
||||
-description.qt3-mysql
|
||||
+description.qt3-postgresql
|
||||
A Plug-in for using the PostgreSQL database with the generic Qt
|
||||
database interface.
|
||||
-description.qt3-postgresql
|
||||
+description.qt3-sqlite
|
||||
The Qt database supports SQLite with this plug-in. (No configured and
|
||||
running daemon is required.)
|
||||
-description.qt3-sqlite
|
||||
+description.qt3-unixODBC
|
||||
A plug-in for using UnixODBC supported databases with the generic Qt
|
||||
database interface.
|
||||
-description.qt3-unixODBC
|
@ -0,0 +1,12 @@
|
||||
qt3
|
||||
qt3-devel
|
||||
arch ppc package qt3-devel-doc
|
||||
arch sparcv9 package qt3-devel-doc
|
||||
arch ppc package qt3-devel-tools
|
||||
arch sparcv9 package qt3-devel-tools
|
||||
arch ppc package qt3-mysql
|
||||
arch sparcv9 package qt3-mysql
|
||||
arch ppc package qt3-postgresql
|
||||
arch sparcv9 package qt3-postgresql
|
||||
arch ppc package qt3-unixODBC
|
||||
arch sparcv9 package qt3-unixODBC
|
@ -0,0 +1,99 @@
|
||||
|
||||
function fix_qconfig_h {
|
||||
mv include/qconfig.h include/qconfig.h.orig
|
||||
sed -e '1i\
|
||||
#ifndef SuSE_QCONFIG_ALREADY_INCLUDED \
|
||||
#define SuSE_QCONFIG_ALREADY_INCLUDED 1 \
|
||||
#define PLUGIN_PATH_EXTENSION "'$PLUGIN_PATH'" \
|
||||
' -e s@${RPM_BUILD_ROOT}@/@ -e '$a\
|
||||
#endif' include/qconfig.h.orig \
|
||||
> include/qconfig.h
|
||||
|
||||
}
|
||||
|
||||
function call_configure {
|
||||
EXTRA_OPTIONS=$@
|
||||
OPENGL="-dlopen-opengl"
|
||||
case $EXTRA_OPTIONS in
|
||||
*-static*)
|
||||
OPENGL="-no-dlopen-opengl"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
[ "$WLIB" == "lib64" ] && PLATFORM=linux-g++-64 || PLATFORM=linux-g++
|
||||
LARGEFILE="-largefile"
|
||||
XCURSOR="-xcursor"
|
||||
XFT="-xft -xrender -I/usr/include/freetype2/ "
|
||||
[ -e /usr/$WLIB/libmng.so ] && LIBMNG="-system-libmng -plugin-imgfmt-mng" || LIBMNG="-qt-libmng "
|
||||
PGSQL="-plugin-sql-psql -I/usr/include -I/usr/include/pgsql/ -I/usr/include/pgsql/server"
|
||||
ODBC="-plugin-sql-odbc"
|
||||
|
||||
if [ -f /.buildenv ] && grep -q BUILD_BASENAME=beta- /.buildenv ; then
|
||||
export NO_BRP_STRIP_DEBUG=true
|
||||
export DEBUG="-debug"
|
||||
else
|
||||
export DEBUG="-release"
|
||||
fi
|
||||
|
||||
PREFIX=/usr/lib/qt3/
|
||||
export LD_LIBRARY_PATH="/${PWD}/lib/"
|
||||
ORACLE="/opt/oracle/product/8.1.6/rdbms/demo/"
|
||||
[ -d $ORACLE ] && \
|
||||
ORACLE="-plugin-sql-oci -I$ORACLE" || \
|
||||
ORACLE=""
|
||||
|
||||
for i in mkspecs/linux-*/qmake.conf ; do
|
||||
sed \
|
||||
-e "s,QMAKE_CFLAGS_RELEASE[\t ]*=.*,QMAKE_CFLAGS_RELEASE = $RPM_OPT_FLAGS," \
|
||||
-e "s,QMAKE_CFLAGS[\t ]*=.*,QMAKE_CFLAGS = -pipe $RPM_OPT_FLAGS," \
|
||||
-e "s,QMAKE_INCDIR[\t ]*=.*,QMAKE_INCDIR = /usr/include/," \
|
||||
-e "s,QMAKE_LIBDIR[\t ]*=.*,QMAKE_LIBDIR = /usr/$WLIB/," \
|
||||
-e "s,QMAKE_LIBDIR_X11[\t ]*=.*,QMAKE_LIBDIR_X11 = /usr/X11R6/$WLIB/," \
|
||||
-e "s,QMAKE_LIBDIR_QT[\t ]*=.*,QMAKE_LIBDIR_QT = \$(QTDIR)/$WLIB/," \
|
||||
-e "s,QMAKE_INCDIR_OPENGL[\t ]*=.*,QMAKE_INCDIR_OPENGL = /usr/include/," \
|
||||
-e "s,QMAKE_LIBDIR_OPENGL[\t ]*=.*,QMAKE_LIBDIR_OPENGL = /usr/$WLIB/," \
|
||||
$i > ${i}.new &&\
|
||||
mv ${i}.new $i
|
||||
done
|
||||
sed -e "s/^CXXFLAGS=/CXXFLAGS= $RPM_OPT_FLAGS/" < qmake/Makefile.unix > qmake/Makefile.unix.tmp && mv qmake/Makefile.unix.tmp qmake/Makefile.unix
|
||||
# ld -Bsymbolic-functions -v >& /dev/null && perl -pi -e 's/^QMAKE_VARS=$/QMAKE_VARS="QMAKE_LFLAGS=-Wl,-Bdirect QMAKE_LFLAGS+=-Wl,-Bsymbolic-functions"/' configure
|
||||
|
||||
# png is direct linked, other picture formats are loaded at runtime
|
||||
OPTIONS="-platform $PLATFORM -qt-gif -stl $DEBUG \
|
||||
-system-zlib -system-libjpeg -system-libpng \
|
||||
-plugin-imgfmt-jpeg -inputmethod \
|
||||
-nis -cups -ipv6 $OPENGL \
|
||||
-xkb $LIBMNG -no-g++-exceptions $LARGEFILE $XCURSOR \
|
||||
$XFT $XINERAMA -sm -L/usr/$WLIB -L/usr/X11R6/$WLIB \
|
||||
-plugin-sql-mysql -I/usr/include/mysql/ \
|
||||
-tablet $ORACLE $PGSQL $ODBC -plugin-sql-sqlite $NEWABI \
|
||||
-prefix $PREFIX -libdir $PREFIX/$WLIB"
|
||||
|
||||
# use styles as plugins, beside platinum. leave windowsxp disabled
|
||||
# nice idea, but too many dumb apps have a hardcoded style list :(
|
||||
# for i in plugins/src/styles/* ; do
|
||||
# if [ -d $i -a ${i##*/} != "platinum" -a ${i##*/} != "windowsxp" ]
|
||||
# then OPTIONS="$OPTIONS -plugin-style-${i##*/}"
|
||||
# fi
|
||||
# done
|
||||
|
||||
[ -e /usr/$WLIB/mysql/ ] && OPTIONS="$OPTIONS -L/usr/$WLIB/mysql/"
|
||||
|
||||
# get sure we use the lib from the system
|
||||
rm -rf src/3rdparty/{libjpeg,libmng,libpng,sqlite,zlib}
|
||||
|
||||
export PATH=$PWD/bin:$PATH
|
||||
echo yes|./configure $OPTIONS $EXTRA_OPTIONS
|
||||
|
||||
# make sure we don't have a crippled qt
|
||||
grep -q "full-config\"" include/qconfig.h || { echo "build key is wrong"; exit 42; }
|
||||
}
|
||||
|
||||
function post_install {
|
||||
if echo $RPM_OPT_FLAGS | grep -q -- -g ; then
|
||||
export NO_BRP_STRIP_DEBUG=true
|
||||
fi
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Exec=designer
|
||||
Name=Qt Designer
|
||||
GenericName=Interface Designer
|
||||
X-KDE-StartupNotify=true
|
||||
MimeType=application/x-designer;
|
||||
Icon=designer
|
||||
Terminal=false
|
||||
Type=Application
|
||||
|
After Width: | Height: | Size: 324 B |
@ -0,0 +1,11 @@
|
||||
--- tools/designer/plugins/plugins.pro
|
||||
+++ tools/designer/plugins/plugins.pro
|
||||
@@ -4,6 +4,7 @@
|
||||
dlg \
|
||||
glade \
|
||||
rc \
|
||||
- kdevdlg
|
||||
+ kdevdlg \
|
||||
+ glade
|
||||
shared:SUBDIRS *= $$PLUGIN_DIRS
|
||||
dll:SUBDIRS *= $$PLUGIN_DIRS
|
@ -0,0 +1,78 @@
|
||||
--- plugins/src/sqldrivers/sqlite/sqlite.pro
|
||||
+++ plugins/src/sqldrivers/sqlite/sqlite.pro
|
||||
@@ -10,6 +10,9 @@
|
||||
|
||||
unix {
|
||||
OBJECTS_DIR = .obj
|
||||
+ !contains( LIBS, .*sqlite.* ) {
|
||||
+ LIBS *= -lsqlite
|
||||
+ }
|
||||
}
|
||||
|
||||
win32 {
|
||||
@@ -23,54 +26,6 @@
|
||||
# }
|
||||
}
|
||||
|
||||
-!contains( LIBS, .*sqlite.* ) {
|
||||
- INCLUDEPATH += ../../../../src/3rdparty/sqlite
|
||||
-
|
||||
- HEADERS += ../../../../src/3rdparty/sqlite/btree.h \
|
||||
- ../../../../src/3rdparty/sqlite/config.h \
|
||||
- ../../../../src/3rdparty/sqlite/hash.h \
|
||||
- ../../../../src/3rdparty/sqlite/opcodes.h \
|
||||
- ../../../../src/3rdparty/sqlite/os.h \
|
||||
- ../../../../src/3rdparty/sqlite/pager.h \
|
||||
- ../../../../src/3rdparty/sqlite/parse.h \
|
||||
- ../../../../src/3rdparty/sqlite/sqlite.h \
|
||||
- ../../../../src/3rdparty/sqlite/sqliteInt.h \
|
||||
- ../../../../src/3rdparty/sqlite/vdbe.h \
|
||||
- ../../../../src/3rdparty/sqlite/vdbeInt.h
|
||||
-
|
||||
- SOURCES += ../../../../src/3rdparty/sqlite/attach.c \
|
||||
- ../../../../src/3rdparty/sqlite/auth.c \
|
||||
- ../../../../src/3rdparty/sqlite/btree.c \
|
||||
- ../../../../src/3rdparty/sqlite/btree_rb.c \
|
||||
- ../../../../src/3rdparty/sqlite/build.c \
|
||||
- ../../../../src/3rdparty/sqlite/copy.c \
|
||||
- ../../../../src/3rdparty/sqlite/date.c \
|
||||
- ../../../../src/3rdparty/sqlite/delete.c \
|
||||
- ../../../../src/3rdparty/sqlite/expr.c \
|
||||
- ../../../../src/3rdparty/sqlite/func.c \
|
||||
- ../../../../src/3rdparty/sqlite/hash.c \
|
||||
- ../../../../src/3rdparty/sqlite/insert.c \
|
||||
- ../../../../src/3rdparty/sqlite/main.c \
|
||||
- ../../../../src/3rdparty/sqlite/opcodes.c \
|
||||
- ../../../../src/3rdparty/sqlite/os.c \
|
||||
- ../../../../src/3rdparty/sqlite/pager.c \
|
||||
- ../../../../src/3rdparty/sqlite/parse.c \
|
||||
- ../../../../src/3rdparty/sqlite/pragma.c \
|
||||
- ../../../../src/3rdparty/sqlite/printf.c \
|
||||
- ../../../../src/3rdparty/sqlite/random.c \
|
||||
- ../../../../src/3rdparty/sqlite/select.c \
|
||||
- ../../../../src/3rdparty/sqlite/shell.c \
|
||||
- ../../../../src/3rdparty/sqlite/table.c \
|
||||
- ../../../../src/3rdparty/sqlite/tokenize.c \
|
||||
- ../../../../src/3rdparty/sqlite/trigger.c \
|
||||
- ../../../../src/3rdparty/sqlite/update.c \
|
||||
- ../../../../src/3rdparty/sqlite/util.c \
|
||||
- ../../../../src/3rdparty/sqlite/vacuum.c \
|
||||
- ../../../../src/3rdparty/sqlite/vdbe.c \
|
||||
- ../../../../src/3rdparty/sqlite/vdbeaux.c \
|
||||
- ../../../../src/3rdparty/sqlite/where.c
|
||||
-}
|
||||
-
|
||||
REQUIRES = sql
|
||||
|
||||
target.path += $$plugins.path/sqldrivers
|
||||
--- src/tools/qcstring.cpp
|
||||
+++ src/tools/qcstring.cpp
|
||||
@@ -50,7 +50,7 @@
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#ifndef QT_NO_COMPRESS
|
||||
-#include "../3rdparty/zlib/zlib.h"
|
||||
+#include <zlib.h>
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
@ -0,0 +1,44 @@
|
||||
--- src/opengl/qgl_x11.cpp
|
||||
+++ src/opengl/qgl_x11.cpp 2004/04/13 14:56:00
|
||||
@@ -267,7 +267,7 @@
|
||||
typedef Status (*_XmuLookupStandardColormap)( Display *dpy, int screen, VisualID visualid, unsigned int depth,
|
||||
Atom property, Bool replace, Bool retain );
|
||||
_XmuLookupStandardColormap qt_XmuLookupStandardColormap;
|
||||
- qt_XmuLookupStandardColormap = (_XmuLookupStandardColormap) QLibrary::resolve("Xmu", "XmuLookupStandardColormap");
|
||||
+ qt_XmuLookupStandardColormap = (_XmuLookupStandardColormap) QLibrary::resolve("Xmu.so.6", "XmuLookupStandardColormap");
|
||||
if (!qt_XmuLookupStandardColormap)
|
||||
qFatal("Unable to resolve Xmu symbols - please check your Xmu library installation.");
|
||||
#define XmuLookupStandardColormap qt_XmuLookupStandardColormap
|
||||
Index: src/tools/qlibrary.cpp
|
||||
===================================================================
|
||||
RCS file: /home/kde/qt-copy/src/tools/qlibrary.cpp,v
|
||||
retrieving revision 1.26
|
||||
diff -u -3 -p -r1.26 qlibrary.cpp
|
||||
--- src/tools/qlibrary.cpp 4 Feb 2004 14:25:02 -0000 1.26
|
||||
+++ src/tools/qlibrary.cpp 2 Jun 2004 08:26:21 -0000
|
||||
@@ -424,7 +424,8 @@ QString QLibrary::library() const
|
||||
} else {
|
||||
tmpfilename = QString( "lib%1" ).arg( filename );
|
||||
}
|
||||
- tmpfilename += filter;
|
||||
+ if ( !filename.contains(".so") )
|
||||
+ tmpfilename += filter;
|
||||
if(QFile::exists(tmpfilename) || it == filters.end()) {
|
||||
filename = tmpfilename;
|
||||
break;
|
||||
Index: src/opengl/qgl_x11.cpp
|
||||
===================================================================
|
||||
RCS file: /home/kde/qt-copy/src/opengl/qgl_x11.cpp,v
|
||||
retrieving revision 1.34
|
||||
diff -u -3 -p -r1.34 qgl_x11.cpp
|
||||
--- src/opengl/qgl_x11.cpp 21 Dec 2003 00:48:09 -0000 1.34
|
||||
+++ src/opengl/qgl_x11.cpp 2 Jun 2004 08:26:21 -0000
|
||||
@@ -116,7 +116,7 @@ bool qt_resolve_gl_symbols(bool fatal)
|
||||
if (gl_syms_resolved)
|
||||
return TRUE;
|
||||
|
||||
- QLibrary gl("GL");
|
||||
+ QLibrary gl("GL.so.1");
|
||||
gl.setAutoUnload(FALSE);
|
||||
|
||||
qt_glCallLists = (_glCallLists) gl.resolve("glCallLists");
|
@ -0,0 +1,10 @@
|
||||
--- plugins/src/accessible/widgets/widgets.pro
|
||||
+++ plugins/src/accessible/widgets/widgets.pro
|
||||
@@ -13,3 +13,7 @@
|
||||
|
||||
HEADERS += qaccessiblewidget.h \
|
||||
qaccessiblemenu.h
|
||||
+
|
||||
+target.path += $$plugins.path/accessible
|
||||
+INSTALLS += target
|
||||
+
|
@ -0,0 +1,11 @@
|
||||
--- tools/assistant/lib/qassistantclient.cpp
|
||||
+++ tools/assistant/lib/qassistantclient.cpp
|
||||
@@ -128,7 +128,7 @@
|
||||
: QObject( parent, name ), host ( "localhost" )
|
||||
{
|
||||
if ( path.isEmpty() )
|
||||
- assistantCommand = "assistant";
|
||||
+ assistantCommand = "/usr/lib/qt3/bin/assistant";
|
||||
else {
|
||||
QFileInfo fi( path );
|
||||
if ( fi.isDir() )
|
@ -0,0 +1,55 @@
|
||||
--- src/kernel/qapplication_x11.cpp
|
||||
+++ src/kernel/qapplication_x11.cpp
|
||||
@@ -3294,11 +3294,7 @@
|
||||
// filtering opportunity first to ensure all input methods work
|
||||
// properly regardless of application design.
|
||||
|
||||
-#ifndef QT_NO_IM_EXTENSIONS
|
||||
if( keywidget && keywidget->isEnabled() && keywidget->isInputMethodEnabled() ) {
|
||||
-#else
|
||||
- if( keywidget && keywidget->isEnabled() ) {
|
||||
-#endif
|
||||
if( ( event->type==XKeyPress || event->type==XKeyRelease ) &&
|
||||
sm_blockUserInput ) // block user interaction during session management
|
||||
return TRUE;
|
||||
@@ -5220,11 +5216,12 @@
|
||||
} else {
|
||||
key = (int)(long)keyDict->find( keycode );
|
||||
if ( key )
|
||||
- if( !willRepeat ) // Take out key of dictionary only if this call.
|
||||
+ if( !willRepeat && statefulTranslation ) // Take out key of dictionary only if this call.
|
||||
keyDict->take( keycode );
|
||||
long s = (long)textDict->find( keycode );
|
||||
if ( s ) {
|
||||
- textDict->take( keycode );
|
||||
+ if( statefulTranslation )
|
||||
+ textDict->take( keycode );
|
||||
ascii = (char)(s-256);
|
||||
}
|
||||
}
|
||||
--- src/kernel/qwidget_x11.cpp
|
||||
+++ src/kernel/qwidget_x11.cpp
|
||||
@@ -2699,11 +2699,10 @@
|
||||
{
|
||||
QInputContext *qic = 0;
|
||||
|
||||
-#if !defined(QT_NO_IM_EXTENSIONS)
|
||||
if ( isInputMethodEnabled() ) {
|
||||
+#if !defined(QT_NO_IM_EXTENSIONS)
|
||||
qic = icHolderWidget()->ic;
|
||||
#else
|
||||
- {
|
||||
// icHolderWidget is always topLevelWidget
|
||||
QTLWExtra *topdata = icHolderWidget()->topData();
|
||||
qic = (QInputContext *)topdata->xic;
|
||||
@@ -2754,10 +2753,8 @@
|
||||
*/
|
||||
void QWidget::createInputContext()
|
||||
{
|
||||
-#if !defined(QT_NO_IM_EXTENSIONS)
|
||||
if( !isInputMethodEnabled() || QApplication::closingDown() )
|
||||
return;
|
||||
-#endif
|
||||
|
||||
QWidget *icWidget = icHolderWidget();
|
||||
#ifndef QT_NO_IM
|
@ -0,0 +1,11 @@
|
||||
--- src/kernel/qtranslator.cpp
|
||||
+++ src/kernel/qtranslator.cpp
|
||||
@@ -1012,7 +1012,7 @@
|
||||
char con[256];
|
||||
for ( ;; ) {
|
||||
t >> len;
|
||||
- if ( len == 0 )
|
||||
+ if ( len == 0 || t.atEnd())
|
||||
return QTranslatorMessage();
|
||||
t.readRawBytes( con, len );
|
||||
con[len] = '\0';
|
@ -0,0 +1,13 @@
|
||||
--- src/dialogs/qdialog.cpp
|
||||
+++ src/dialogs/qdialog.cpp
|
||||
@@ -803,7 +803,9 @@
|
||||
w = w->topLevelWidget();
|
||||
QRect desk;
|
||||
if ( w ) {
|
||||
- scrn = QApplication::desktop()->screenNumber( w );
|
||||
+ // Use mapToGlobal rather than geometry() in case w might
|
||||
+ // be embedded in another application
|
||||
+ scrn = QApplication::desktop()->screenNumber( w->mapToGlobal( QPoint(0,0) ) );
|
||||
} else if ( QApplication::desktop()->isVirtualDesktop() ) {
|
||||
scrn = QApplication::desktop()->screenNumber( QCursor::pos() );
|
||||
} else {
|
@ -0,0 +1,37 @@
|
||||
--- src/kernel/qtaddons_x11.cpp
|
||||
+++ src/kernel/qtaddons_x11.cpp
|
||||
@@ -22,6 +22,10 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
+#ifndef QT_CLEAN_NAMESPACE
|
||||
+#define QT_CLEAN_NAMESPACE
|
||||
+#endif
|
||||
+
|
||||
#include "qt_x11_p.h"
|
||||
|
||||
#if !defined(QT_NO_XFTFREETYPE) && !defined(QT_XFT2)
|
||||
--- src/kernel/qt_x11_p.h
|
||||
+++ src/kernel/qt_x11_p.h
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
|
||||
// the wacom tablet (currently just the IRIX version)
|
||||
-#if defined (QT_TABLET_SUPPORT)
|
||||
+#if defined (QT_TABLET_SUPPORT) && defined (QT_CLEAN_NAMESPACE)
|
||||
# include <X11/extensions/XInput.h>
|
||||
#if defined (Q_OS_IRIX)
|
||||
# include <wacom.h> // wacom driver defines for IRIX (quite handy)
|
||||
--- src/kernel/qwidget_x11.cpp
|
||||
+++ src/kernel/qwidget_x11.cpp
|
||||
@@ -38,6 +38,10 @@
|
||||
**
|
||||
**********************************************************************/
|
||||
|
||||
+#ifndef QT_CLEAN_NAMESPACE
|
||||
+#define QT_CLEAN_NAMESPACE
|
||||
+#endif
|
||||
+
|
||||
#include "qapplication.h"
|
||||
#include "qapplication_p.h"
|
||||
#include "qnamespace.h"
|
@ -0,0 +1,56 @@
|
||||
Index: src/tools/qvaluelist.h
|
||||
===================================================================
|
||||
--- src/tools/qvaluelist.h.orig 2011-03-31 20:14:47.200973928 +0200
|
||||
+++ src/tools/qvaluelist.h 2011-03-31 20:14:55.352615654 +0200
|
||||
@@ -50,6 +50,7 @@
|
||||
#ifndef QT_NO_STL
|
||||
#include <iterator>
|
||||
#include <list>
|
||||
+#include <cstddef>
|
||||
#endif
|
||||
|
||||
//#define QT_CHECK_VALUELIST_RANGE
|
||||
Index: src/tools/qvaluevector.h
|
||||
===================================================================
|
||||
--- src/tools/qvaluevector.h.orig 2008-01-15 20:09:13.000000000 +0100
|
||||
+++ src/tools/qvaluevector.h 2011-03-31 20:15:15.904712567 +0200
|
||||
@@ -244,7 +244,7 @@ public:
|
||||
typedef const value_type& const_reference;
|
||||
typedef size_t size_type;
|
||||
#ifndef QT_NO_STL
|
||||
- typedef ptrdiff_t difference_type;
|
||||
+ typedef std::ptrdiff_t difference_type;
|
||||
#else
|
||||
typedef int difference_type;
|
||||
#endif
|
||||
Index: src/tools/qmap.h
|
||||
===================================================================
|
||||
--- src/tools/qmap.h.orig 2008-01-15 20:09:13.000000000 +0100
|
||||
+++ src/tools/qmap.h 2011-03-31 20:24:35.802101605 +0200
|
||||
@@ -107,7 +107,7 @@ class QMapIterator
|
||||
#endif
|
||||
typedef T value_type;
|
||||
#ifndef QT_NO_STL
|
||||
- typedef ptrdiff_t difference_type;
|
||||
+ typedef std::ptrdiff_t difference_type;
|
||||
#else
|
||||
typedef int difference_type;
|
||||
#endif
|
||||
@@ -223,7 +223,7 @@ class QMapConstIterator
|
||||
#endif
|
||||
typedef T value_type;
|
||||
#ifndef QT_NO_STL
|
||||
- typedef ptrdiff_t difference_type;
|
||||
+ typedef std::ptrdiff_t difference_type;
|
||||
#else
|
||||
typedef int difference_type;
|
||||
#endif
|
||||
@@ -604,7 +604,7 @@ public:
|
||||
typedef value_type& reference;
|
||||
typedef const value_type& const_reference;
|
||||
#ifndef QT_NO_STL
|
||||
- typedef ptrdiff_t difference_type;
|
||||
+ typedef std::ptrdiff_t difference_type;
|
||||
#else
|
||||
typedef int difference_type;
|
||||
#endif
|
@ -0,0 +1,60 @@
|
||||
--- src/3rdparty/libmng/aclocal.m4
|
||||
+++ src/3rdparty/libmng/aclocal.m4
|
||||
@@ -1607,7 +1607,7 @@
|
||||
# If the export-symbols file already is a .def file (1st line
|
||||
# is EXPORTS), use it as is.
|
||||
# If DATA tags from a recent dlltool are present, honour them!
|
||||
- archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
|
||||
+ archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
|
||||
cp $export_symbols $output_objdir/$soname-def;
|
||||
else
|
||||
echo EXPORTS > $output_objdir/$soname-def;
|
||||
@@ -3546,7 +3546,7 @@
|
||||
lt_cv_file_magic_cmd='/usr/bin/file -L'
|
||||
case "$host_os" in
|
||||
rhapsody* | darwin1.[[012]])
|
||||
- lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
|
||||
+ lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -n 1`
|
||||
;;
|
||||
*) # Darwin 1.3 on
|
||||
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
|
||||
--- src/3rdparty/libmng/config.guess
|
||||
+++ src/3rdparty/libmng/config.guess
|
||||
@@ -319,7 +319,7 @@
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun*:*:4.2BSD:*)
|
||||
- UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
+ UNAME_RELEASE=`(head -n 1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
|
||||
case "`/bin/arch`" in
|
||||
sun3)
|
||||
@@ -506,7 +506,7 @@
|
||||
fi
|
||||
exit 0 ;;
|
||||
*:AIX:*:[45])
|
||||
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
|
||||
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -n 1 | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
else
|
||||
--- src/3rdparty/libmng/configure
|
||||
+++ src/3rdparty/libmng/configure
|
||||
@@ -1956,7 +1956,7 @@
|
||||
lt_cv_file_magic_cmd='/usr/bin/file -L'
|
||||
case "$host_os" in
|
||||
rhapsody* | darwin1.[012])
|
||||
- lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
|
||||
+ lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -n 1`
|
||||
;;
|
||||
*) # Darwin 1.3 on
|
||||
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
|
||||
@@ -3433,7 +3433,7 @@
|
||||
# If the export-symbols file already is a .def file (1st line
|
||||
# is EXPORTS), use it as is.
|
||||
# If DATA tags from a recent dlltool are present, honour them!
|
||||
- archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
|
||||
+ archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
|
||||
cp $export_symbols $output_objdir/$soname-def;
|
||||
else
|
||||
echo EXPORTS > $output_objdir/$soname-def;
|
@ -0,0 +1,10 @@
|
||||
--- src/widgets/qpopupmenu.cpp
|
||||
+++ src/widgets/qpopupmenu.cpp
|
||||
@@ -1354,6 +1354,7 @@
|
||||
performDelayedChanges();
|
||||
updateSize(TRUE);
|
||||
QWidget::show();
|
||||
+ updateSize();
|
||||
popupActive = -1;
|
||||
if(style().styleHint(QStyle::SH_PopupMenu_SubMenuPopupDelay, this))
|
||||
d->mouseMoveBuffer = QRegion();
|
@ -0,0 +1,12 @@
|
||||
--- src/tools/qgpluginmanager.cpp
|
||||
+++ src/tools/qgpluginmanager.cpp 2004/09/25 11:46:41
|
||||
@@ -377,6 +377,9 @@
|
||||
QString basename = (*git).left( (*git).find( QChar(0xfffd) ) );
|
||||
++git;
|
||||
|
||||
+ // WARNING: this line should only exist on lib64 systems !
|
||||
+ basename += ".lib64";
|
||||
+
|
||||
QStringList sameBasename;
|
||||
while( git != group.end() &&
|
||||
basename == (*git).left( (*git).find( QChar(0xfffd) ) ) ) {
|
@ -0,0 +1,103 @@
|
||||
Index: kernel/qasyncimageio.cpp
|
||||
================================================================================
|
||||
--- src/kernel/qasyncimageio.cpp
|
||||
+++ src/kernel/qasyncimageio.cpp
|
||||
@@ -901,7 +901,12 @@
|
||||
sheight = newtop + newheight;
|
||||
|
||||
if (img.isNull()) {
|
||||
- img.create(swidth, sheight, 32);
|
||||
+ bool ok = img.create(swidth, sheight, 32);
|
||||
+ if (!ok)
|
||||
+ {
|
||||
+ state = Error;
|
||||
+ break;
|
||||
+ }
|
||||
memset( img.bits(), 0, img.numBytes() );
|
||||
if (consumer) consumer->setSize(swidth, sheight);
|
||||
}
|
||||
@@ -956,9 +961,15 @@
|
||||
if (backingstore.width() < w
|
||||
|| backingstore.height() < h) {
|
||||
// We just use the backing store as a byte array
|
||||
- backingstore.create( QMAX(backingstore.width(), w),
|
||||
+ bool ok = backingstore.create(
|
||||
+ QMAX(backingstore.width(), w),
|
||||
QMAX(backingstore.height(), h),
|
||||
32);
|
||||
+ if (!ok)
|
||||
+ {
|
||||
+ state = Error;
|
||||
+ break;
|
||||
+ }
|
||||
memset( img.bits(), 0, img.numBytes() );
|
||||
}
|
||||
for (int ln=0; ln<h; ln++) {
|
||||
--- src/kernel/qimage.cpp
|
||||
+++ src/kernel/qimage.cpp
|
||||
@@ -65,6 +65,8 @@
|
||||
#define QT_NO_IMAGE_16_BIT
|
||||
#endif
|
||||
|
||||
+int qt_max_image_height = 0;
|
||||
+int qt_max_image_width = 0;
|
||||
|
||||
/*!
|
||||
\class QImage
|
||||
@@ -1201,6 +1203,28 @@
|
||||
data->alpha = enable;
|
||||
}
|
||||
|
||||
+QSize QImage::maxImageSize()
|
||||
+{
|
||||
+ if (!qt_max_image_height || !qt_max_image_width)
|
||||
+ return QSize();
|
||||
+ return QSize(qt_max_image_height, qt_max_image_width);
|
||||
+}
|
||||
+
|
||||
+void QImage::setMaxImageSize(const QSize &size)
|
||||
+{
|
||||
+ if (size.isValid())
|
||||
+ {
|
||||
+ qt_max_image_height = size.height();
|
||||
+ qt_max_image_width = size.width();
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ qt_max_image_height = 0;
|
||||
+ qt_max_image_width = 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
|
||||
/*!
|
||||
Sets the image \a width, \a height, \a depth, its number of colors
|
||||
@@ -1230,6 +1254,14 @@
|
||||
reset(); // reset old data
|
||||
if ( width <= 0 || height <= 0 || depth <= 0 || numColors < 0 )
|
||||
return FALSE; // invalid parameter(s)
|
||||
+ if ( qt_max_image_height && (height > qt_max_image_height * 4))
|
||||
+ return FALSE; // Too high
|
||||
+ if ( qt_max_image_width && (width > qt_max_image_width * 4))
|
||||
+ return FALSE; // Too wide
|
||||
+ if ( qt_max_image_height && qt_max_image_width &&
|
||||
+ (height * width > qt_max_image_height * qt_max_image_width))
|
||||
+ return FALSE; // Too large
|
||||
+
|
||||
if ( depth == 1 && bitOrder == IgnoreEndian ) {
|
||||
#if defined(QT_CHECK_RANGE)
|
||||
qWarning( "QImage::create: Bit order is required for 1 bpp images" );
|
||||
--- src/kernel/qimage.h
|
||||
+++ src/kernel/qimage.h
|
||||
@@ -194,6 +194,10 @@
|
||||
int quality=-1 ) const;
|
||||
bool save( QIODevice * device, const char* format,
|
||||
int quality=-1 ) const;
|
||||
+
|
||||
+#define QT_HAVE_MAX_IMAGE_SIZE
|
||||
+ static QSize maxImageSize();
|
||||
+ static void setMaxImageSize(const QSize &size);
|
||||
#endif //QT_NO_IMAGEIO
|
||||
|
||||
bool valid( int x, int y ) const;
|
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Exec=linguist
|
||||
Name=Qt Linguist
|
||||
GenericName=Translation Tool
|
||||
X-KDE-StartupNotify=true
|
||||
MimeType=application/x-linguist;
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=linguist
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
@ -0,0 +1,30 @@
|
||||
--- src/kernel/qmngio.cpp.sav 2007-02-23 14:01:19.000000000 +0100
|
||||
+++ src/kernel/qmngio.cpp 2007-08-28 15:27:28.000000000 +0200
|
||||
@@ -411,8 +411,11 @@ int QMNGFormat::decode( QImage& img, QIm
|
||||
}
|
||||
|
||||
losttime += losingtimer.elapsed();
|
||||
- if ( ndata || !length )
|
||||
- mng_display_resume(handle);
|
||||
+ bool needmore = false;
|
||||
+ if ( ndata ) {
|
||||
+ mng_retcode r = mng_display_resume(handle);
|
||||
+ needmore = ( r == MNG_NEEDMOREDATA );
|
||||
+ }
|
||||
losingtimer.start();
|
||||
|
||||
image = 0;
|
||||
@@ -422,6 +425,13 @@ int QMNGFormat::decode( QImage& img, QIm
|
||||
// Move back unused tail
|
||||
memcpy(buffer,buffer+ubuffer,nbuffer);
|
||||
}
|
||||
+ // "The function should return without processing all the data if it reaches the end of a frame in the input."
|
||||
+ if( ndata && !needmore ) {
|
||||
+ length -= ndata;
|
||||
+ ndata = 0;
|
||||
+ if( length == 0 ) // 0 means done, process at least one byte
|
||||
+ length = ndata = 1;
|
||||
+ }
|
||||
if ( ndata ) {
|
||||
// Not all used.
|
||||
enlargeBuffer(nbuffer+ndata);
|
@ -0,0 +1,21 @@
|
||||
--- mkspecs/linux-g++-64/qmake.conf
|
||||
+++ mkspecs/linux-g++-64/qmake.conf
|
||||
@@ -58,7 +58,7 @@
|
||||
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
|
||||
QMAKE_LFLAGS_SONAME = -Wl,-soname,
|
||||
QMAKE_LFLAGS_THREAD =
|
||||
-QMAKE_RPATH = -Wl,-rpath,
|
||||
+QMAKE_RPATH =
|
||||
|
||||
QMAKE_LIBS =
|
||||
QMAKE_LIBS_DYNLOAD = -ldl
|
||||
--- mkspecs/linux-g++/qmake.conf
|
||||
+++ mkspecs/linux-g++/qmake.conf
|
||||
@@ -55,7 +55,6 @@
|
||||
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
|
||||
QMAKE_LFLAGS_SONAME = -Wl,-soname,
|
||||
QMAKE_LFLAGS_THREAD =
|
||||
-QMAKE_RPATH = -Wl,-rpath,
|
||||
|
||||
QMAKE_LIBS =
|
||||
QMAKE_LIBS_DYNLOAD = -ldl
|
@ -0,0 +1,18 @@
|
||||
--- src/kernel/qfontdatabase.cpp
|
||||
+++ src/kernel/qfontdatabase.cpp
|
||||
@@ -2470,11 +2470,14 @@ void QFontDatabase::parseFontName(const
|
||||
int i = name.find('[');
|
||||
int li = name.findRev(']');
|
||||
|
||||
- if (i < li) {
|
||||
+ if (i > 0 && i + 1 < li) {
|
||||
foundry = name.mid(i + 1, li - i - 1);
|
||||
if (name[i - 1] == ' ')
|
||||
i--;
|
||||
family = name.left(i);
|
||||
+ } else {
|
||||
+ foundry = QString::null;
|
||||
+ family = name;
|
||||
}
|
||||
} else {
|
||||
foundry = QString::null;
|
@ -0,0 +1,11 @@
|
||||
--- src/tools/qgpluginmanager.cpp
|
||||
+++ src/tools/qgpluginmanager.cpp
|
||||
@@ -383,6 +383,8 @@
|
||||
sameBasename << (*git).mid( (*git).find( QChar(0xfffd) ) + 1 );
|
||||
++git;
|
||||
}
|
||||
+ if( !sameBasename.isEmpty())
|
||||
+ sameBasename.prepend( lib );
|
||||
|
||||
if ( sameBasename.isEmpty() ) {
|
||||
that->addLibrary( new QComLibrary( lib ) );
|
@ -0,0 +1,10 @@
|
||||
--- tools/linguist/shared/proparser.cpp
|
||||
+++ tools/linguist/shared/proparser.cpp
|
||||
@@ -207,6 +207,7 @@ QMap<QString, QString> proFileTagMap( const QString& text )
|
||||
buff[read_in] = '\0';
|
||||
after += buff;
|
||||
}
|
||||
+ pclose( proc );
|
||||
(*it).replace( i, callToSystem.matchedLength(), after );
|
||||
i += after.length();
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
# This script is called automatically during autobuild checkin.
|
||||
|
||||
cp -fl qt3.changes qt3-extensions.changes
|
||||
cp -fl qt3.changes qt3-devel-doc.changes
|
||||
|
||||
for spec in qt3-extensions.spec qt3-devel-doc.spec; do
|
||||
{ sed -n -e '1,/COMMON-BEGIN/p' $spec.in
|
||||
sed -n -e '/COMMON-BEGIN/,/COMMON-END/p' qt3.spec
|
||||
sed -n -e '/COMMON-END/,$p' $spec.in; } > $spec.tmp && perl update_spec.pl $spec.tmp attributes > $spec && rm $spec.tmp
|
||||
done
|
||||
|
||||
|
||||
osc service localrun format_spec_file
|
@ -0,0 +1,15 @@
|
||||
--- src/tools/qcstring.h (revision 658213)
|
||||
+++ src/tools/qcstring.h (working copy)
|
||||
@@ -161,7 +161,11 @@ public:
|
||||
|
||||
QCString copy() const;
|
||||
|
||||
- QCString &sprintf( const char *format, ... );
|
||||
+ QCString &sprintf( const char *format, ... )
|
||||
+#if defined(Q_CC_GNU) && !defined(__INSURE__)
|
||||
+ __attribute__ ((format (printf, 2, 3)))
|
||||
+#endif
|
||||
+ ;
|
||||
|
||||
int find( char c, int index=0, bool cs=TRUE ) const;
|
||||
int find( const char *str, int index=0, bool cs=TRUE ) const;
|
@ -0,0 +1,58 @@
|
||||
--- src/kernel/qobject.cpp
|
||||
+++ src/kernel/qobject.cpp
|
||||
@@ -360,6 +360,30 @@
|
||||
}
|
||||
}
|
||||
|
||||
+/*! \internal
|
||||
+ TQt compatibility function
|
||||
+*/
|
||||
+QObjectList QObject::childrenListObject() {
|
||||
+ if (children()) return *(children());
|
||||
+ else return QObjectList();
|
||||
+}
|
||||
+
|
||||
+/*! \internal
|
||||
+ TQt compatibility function
|
||||
+*/
|
||||
+const QObjectList QObject::childrenListObject() const {
|
||||
+ if (children()) return *(children());
|
||||
+ else return QObjectList();
|
||||
+}
|
||||
+
|
||||
+/*! \internal
|
||||
+ TQt compatibility function
|
||||
+*/
|
||||
+const QObjectList QObject::objectTreesListObject() {
|
||||
+ if (objectTrees()) return *(objectTrees());
|
||||
+ else return QObjectList();
|
||||
+}
|
||||
+
|
||||
|
||||
/*****************************************************************************
|
||||
QObject member functions
|
||||
--- src/kernel/qobject.h
|
||||
+++ src/kernel/qobject.h
|
||||
@@ -101,8 +101,11 @@
|
||||
|
||||
QObject *child( const char *objName, const char *inheritsClass = 0, bool recursiveSearch = TRUE ); //### const in 4.0
|
||||
const QObjectList *children() const { return childObjects; }
|
||||
+ QObjectList childrenListObject();
|
||||
+ const QObjectList childrenListObject() const;
|
||||
|
||||
static const QObjectList *objectTrees();
|
||||
+ static const QObjectList objectTreesListObject();
|
||||
|
||||
QObjectList *queryList( const char *inheritsClass = 0,
|
||||
const char *objName = 0,
|
||||
--- src/tools/qglobal.h
|
||||
+++ src/tools/qglobal.h
|
||||
@@ -41,7 +41,7 @@
|
||||
#ifndef QGLOBAL_H
|
||||
#define QGLOBAL_H
|
||||
|
||||
-#define QT_VERSION_STR "3.3.8b"
|
||||
+#define QT_VERSION_STR "3.3.8c"
|
||||
/*
|
||||
QT_VERSION is (major << 16) + (minor << 8) + patch.
|
||||
*/
|
@ -0,0 +1,49 @@
|
||||
--- src/kernel/qapplication.cpp
|
||||
+++ src/kernel/qapplication.cpp
|
||||
@@ -317,6 +317,7 @@
|
||||
void qt_cleanup();
|
||||
#if defined(Q_WS_X11)
|
||||
void qt_init( Display* dpy, Qt::HANDLE, Qt::HANDLE );
|
||||
+void qt_init( int *, char **, Display* dpy, Qt::HANDLE, Qt::HANDLE );
|
||||
#endif
|
||||
Q_EXPORT bool qt_tryModalHelper( QWidget *widget, QWidget **rettop );
|
||||
|
||||
@@ -905,7 +906,7 @@
|
||||
|
||||
qt_init( &argc, argv, GuiClient );
|
||||
} else {
|
||||
- qt_init(dpy, visual, colormap);
|
||||
+ qt_init( &argc, argv, dpy, visual, colormap);
|
||||
}
|
||||
|
||||
process_cmdline( &argc, argv );
|
||||
--- src/kernel/qapplication_x11.cpp
|
||||
+++ src/kernel/qapplication_x11.cpp
|
||||
@@ -197,6 +197,7 @@
|
||||
static Display *appDpy = 0; // X11 application display
|
||||
static char *appDpyName = 0; // X11 display name
|
||||
static bool appForeignDpy = FALSE; // we didn't create display
|
||||
+Q_EXPORT bool qt_no_foreign_hack = false;
|
||||
static bool appSync = FALSE; // X11 synchronization
|
||||
#if defined(QT_DEBUG)
|
||||
static bool appNoGrab = FALSE; // X11 grabbing enabled
|
||||
@@ -1610,7 +1611,7 @@
|
||||
setlocale( LC_ALL, "" ); // use correct char set mapping
|
||||
setlocale( LC_NUMERIC, "C" ); // make sprintf()/scanf() work
|
||||
|
||||
- if ( display ) {
|
||||
+ if ( display && ! qt_no_foreign_hack ) {
|
||||
// Qt part of other application
|
||||
|
||||
appForeignDpy = TRUE;
|
||||
@@ -2390,6 +2391,10 @@
|
||||
qt_init_internal( 0, 0, display, visual, colormap );
|
||||
}
|
||||
|
||||
+void qt_init( int *argcptr, char **argv, Display *display, Qt::HANDLE visual, Qt::HANDLE colormap )
|
||||
+{
|
||||
+ qt_init_internal( argcptr, argv, display, visual, colormap );
|
||||
+}
|
||||
|
||||
/*****************************************************************************
|
||||
qt_cleanup() - cleans up when the application is finished
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,270 @@
|
||||
--- src/dialogs/qcolordialog.cpp
|
||||
+++ src/dialogs/qcolordialog.cpp
|
||||
@@ -60,6 +60,10 @@
|
||||
QColor macGetColor( const QColor& initial, QWidget *parent, const char *name );
|
||||
#endif
|
||||
|
||||
+#ifdef Q_WS_X11
|
||||
+#include "private/qtkdeintegration_x11_p.h"
|
||||
+#endif
|
||||
+
|
||||
//////////// QWellArray BEGIN
|
||||
|
||||
struct QWellArrayData;
|
||||
@@ -1478,7 +1482,10 @@
|
||||
QColor QColorDialog::getColor( const QColor& initial, QWidget *parent,
|
||||
const char *name )
|
||||
{
|
||||
-#if defined(Q_WS_MAC)
|
||||
+#if defined(Q_WS_X11)
|
||||
+ if( QKDEIntegration::enabled())
|
||||
+ return QKDEIntegration::getColor( initial, parent, name );
|
||||
+#elif defined(Q_WS_MAC)
|
||||
return macGetColor(initial, parent, name);
|
||||
#endif
|
||||
|
||||
@@ -1516,6 +1523,13 @@
|
||||
QWidget *parent, const char* name )
|
||||
{
|
||||
#if defined(Q_WS_MAC)
|
||||
+ if( QKDEIntegration::enabled()) {
|
||||
+ QColor color = QKDEIntegration::getColor( QColor( initial ), parent, name );
|
||||
+ if( ok )
|
||||
+ *ok = color.isValid();
|
||||
+ return color.rgba();
|
||||
+ }
|
||||
+#elif defined(Q_WS_MAC)
|
||||
return macGetRgba(initial, ok, parent, name);
|
||||
#endif
|
||||
|
||||
--- src/dialogs/qfiledialog.cpp
|
||||
+++ src/dialogs/qfiledialog.cpp
|
||||
@@ -92,6 +92,10 @@
|
||||
#include "qvbox.h"
|
||||
#include "qwidgetstack.h"
|
||||
|
||||
+#ifdef Q_WS_X11
|
||||
+#include "private/qtkdeintegration_x11_p.h"
|
||||
+#endif
|
||||
+
|
||||
#ifdef Q_WS_WIN
|
||||
#ifdef QT_THREAD_SUPPORT
|
||||
# include <private/qmutexpool_p.h>
|
||||
@@ -3464,7 +3468,11 @@
|
||||
if ( workingDirectory->isNull() )
|
||||
*workingDirectory = ::toRootIfNotExists( QDir::currentDirPath() );
|
||||
|
||||
-#if defined(Q_WS_WIN)
|
||||
+#if defined(Q_WS_X11)
|
||||
+ if ( qt_use_native_dialogs && QKDEIntegration::enabled())
|
||||
+ return QKDEIntegration::getOpenFileNames( filter, workingDirectory, parent, name,
|
||||
+ caption, selectedFilter, false ).first();
|
||||
+#elif defined(Q_WS_WIN)
|
||||
if ( qt_use_native_dialogs && qApp->style().styleHint( QStyle::SH_GUIStyle ) == WindowsStyle )
|
||||
return winGetOpenFileName( initialSelection, filter, workingDirectory,
|
||||
parent, name, caption, selectedFilter );
|
||||
@@ -3585,7 +3593,11 @@
|
||||
if ( workingDirectory->isNull() )
|
||||
*workingDirectory = ::toRootIfNotExists( QDir::currentDirPath() );
|
||||
|
||||
-#if defined(Q_WS_WIN)
|
||||
+#if defined(Q_WS_X11)
|
||||
+ if ( qt_use_native_dialogs && QKDEIntegration::enabled())
|
||||
+ return QKDEIntegration::getSaveFileName( initialSelection, filter, workingDirectory,
|
||||
+ parent, name, caption, selectedFilter );
|
||||
+#elif defined(Q_WS_WIN)
|
||||
if ( qt_use_native_dialogs && qApp->style().styleHint( QStyle::SH_GUIStyle ) == WindowsStyle )
|
||||
return winGetSaveFileName( initialSelection, filter, workingDirectory,
|
||||
parent, name, caption, selectedFilter );
|
||||
@@ -4475,7 +4487,17 @@
|
||||
if ( workingDirectory )
|
||||
wd = *workingDirectory;
|
||||
|
||||
-#if defined(Q_WS_WIN)
|
||||
+#if defined(Q_WS_X11)
|
||||
+ QString initialDir;
|
||||
+ if ( !dir.isEmpty() ) {
|
||||
+ QUrlOperator u( dir );
|
||||
+ if ( QFileInfo( u.path() ).isDir() )
|
||||
+ initialDir = dir;
|
||||
+ } else
|
||||
+ initialDir = QString::null;
|
||||
+ if ( qt_use_native_dialogs && QKDEIntegration::enabled())
|
||||
+ return QKDEIntegration::getExistingDirectory( initialDir, parent, name, caption );
|
||||
+#elif defined(Q_WS_WIN)
|
||||
QString initialDir;
|
||||
if ( !dir.isEmpty() ) {
|
||||
QUrlOperator u( dir );
|
||||
@@ -5636,7 +5658,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
-#if defined(Q_WS_WIN)
|
||||
+#if defined(Q_WS_X11)
|
||||
+ if ( qt_use_native_dialogs && QKDEIntegration::enabled())
|
||||
+ return QKDEIntegration::getOpenFileNames( filter, workingDirectory, parent, name, caption, selectedFilter, true );
|
||||
+#elif defined(Q_WS_WIN)
|
||||
if ( qt_use_native_dialogs && qApp->style().styleHint( QStyle::SH_GUIStyle ) == WindowsStyle )
|
||||
return winGetOpenFileNames( filter, workingDirectory, parent, name, caption, selectedFilter );
|
||||
#elif defined(Q_WS_MAC)
|
||||
--- src/dialogs/qfontdialog.cpp
|
||||
+++ src/dialogs/qfontdialog.cpp
|
||||
@@ -56,6 +56,10 @@
|
||||
#include <private/qfontdata_p.h>
|
||||
#include <qvalidator.h>
|
||||
|
||||
+#ifdef Q_WS_X11
|
||||
+#include "private/qtkdeintegration_x11_p.h"
|
||||
+#endif
|
||||
+
|
||||
/*!
|
||||
\class QFontDialog qfontdialog.h
|
||||
\ingroup dialogs
|
||||
@@ -384,9 +388,15 @@
|
||||
return getFont( ok, 0, parent, name );
|
||||
}
|
||||
|
||||
+extern bool qt_use_native_dialogs;
|
||||
+
|
||||
QFont QFontDialog::getFont( bool *ok, const QFont *def,
|
||||
QWidget *parent, const char* name)
|
||||
{
|
||||
+#if defined(Q_WS_X11)
|
||||
+ if ( qt_use_native_dialogs && QKDEIntegration::enabled())
|
||||
+ return QKDEIntegration::getFont( ok, def, parent, name );
|
||||
+#endif
|
||||
QFont result;
|
||||
if ( def )
|
||||
result = *def;
|
||||
--- src/dialogs/qmessagebox.cpp
|
||||
+++ src/dialogs/qmessagebox.cpp
|
||||
@@ -54,6 +54,12 @@
|
||||
#endif
|
||||
|
||||
|
||||
+#ifdef Q_WS_X11
|
||||
+#include "private/qtkdeintegration_x11_p.h"
|
||||
+#endif
|
||||
+
|
||||
+extern bool qt_use_native_dialogs;
|
||||
+
|
||||
// Internal class - don't touch
|
||||
|
||||
class QMessageBoxLabel : public QLabel
|
||||
@@ -1110,6 +1116,10 @@
|
||||
const QString& caption, const QString& text,
|
||||
int button0, int button1, int button2 )
|
||||
{
|
||||
+#if defined(Q_WS_X11)
|
||||
+ if ( qt_use_native_dialogs && QKDEIntegration::enabled())
|
||||
+ return QKDEIntegration::information( parent, caption, text, button0, button1, button2 );
|
||||
+#endif
|
||||
QMessageBox *mb = new QMessageBox( caption, text, Information,
|
||||
button0, button1, button2,
|
||||
parent, "qt_msgbox_information", TRUE,
|
||||
@@ -1157,6 +1167,10 @@
|
||||
const QString& caption, const QString& text,
|
||||
int button0, int button1, int button2 )
|
||||
{
|
||||
+#if defined(Q_WS_X11)
|
||||
+ if ( qt_use_native_dialogs && QKDEIntegration::enabled())
|
||||
+ return QKDEIntegration::question( parent, caption, text, button0, button1, button2 );
|
||||
+#endif
|
||||
QMessageBox *mb = new QMessageBox( caption, text, Question,
|
||||
button0, button1, button2,
|
||||
parent, "qt_msgbox_information", TRUE,
|
||||
@@ -1205,6 +1219,10 @@
|
||||
const QString& caption, const QString& text,
|
||||
int button0, int button1, int button2 )
|
||||
{
|
||||
+#if defined(Q_WS_X11)
|
||||
+ if ( qt_use_native_dialogs && QKDEIntegration::enabled())
|
||||
+ return QKDEIntegration::warning( parent, caption, text, button0, button1, button2 );
|
||||
+#endif
|
||||
QMessageBox *mb = new QMessageBox( caption, text, Warning,
|
||||
button0, button1, button2,
|
||||
parent, "qt_msgbox_warning", TRUE,
|
||||
@@ -1253,6 +1271,10 @@
|
||||
const QString& caption, const QString& text,
|
||||
int button0, int button1, int button2 )
|
||||
{
|
||||
+#if defined(Q_WS_X11)
|
||||
+ if ( qt_use_native_dialogs && QKDEIntegration::enabled())
|
||||
+ return QKDEIntegration::critical( parent, caption, text, button0, button1, button2 );
|
||||
+#endif
|
||||
QMessageBox *mb = new QMessageBox( caption, text, Critical,
|
||||
button0, button1, button2,
|
||||
parent, "qt_msgbox_critical", TRUE,
|
||||
@@ -1400,6 +1422,11 @@
|
||||
int defaultButtonNumber,
|
||||
int escapeButtonNumber )
|
||||
{
|
||||
+#if defined(Q_WS_X11)
|
||||
+ if ( qt_use_native_dialogs && QKDEIntegration::enabled())
|
||||
+ return QKDEIntegration::information( parent, caption, text,
|
||||
+ button0Text, button1Text, button2Text, defaultButtonNumber, escapeButtonNumber );
|
||||
+#endif
|
||||
return textBox( parent, Information, caption, text,
|
||||
button0Text, button1Text, button2Text,
|
||||
defaultButtonNumber, escapeButtonNumber );
|
||||
@@ -1442,6 +1469,11 @@
|
||||
int defaultButtonNumber,
|
||||
int escapeButtonNumber )
|
||||
{
|
||||
+#if defined(Q_WS_X11)
|
||||
+ if ( qt_use_native_dialogs && QKDEIntegration::enabled())
|
||||
+ return QKDEIntegration::question( parent, caption, text,
|
||||
+ button0Text, button1Text, button2Text, defaultButtonNumber, escapeButtonNumber );
|
||||
+#endif
|
||||
return textBox( parent, Question, caption, text,
|
||||
button0Text, button1Text, button2Text,
|
||||
defaultButtonNumber, escapeButtonNumber );
|
||||
@@ -1486,6 +1518,11 @@
|
||||
int defaultButtonNumber,
|
||||
int escapeButtonNumber )
|
||||
{
|
||||
+#if defined(Q_WS_X11)
|
||||
+ if ( qt_use_native_dialogs && QKDEIntegration::enabled())
|
||||
+ return QKDEIntegration::warning( parent, caption, text,
|
||||
+ button0Text, button1Text, button2Text, defaultButtonNumber, escapeButtonNumber );
|
||||
+#endif
|
||||
return textBox( parent, Warning, caption, text,
|
||||
button0Text, button1Text, button2Text,
|
||||
defaultButtonNumber, escapeButtonNumber );
|
||||
@@ -1526,6 +1563,11 @@
|
||||
int defaultButtonNumber,
|
||||
int escapeButtonNumber )
|
||||
{
|
||||
+#if defined(Q_WS_X11)
|
||||
+ if ( qt_use_native_dialogs && QKDEIntegration::enabled())
|
||||
+ return QKDEIntegration::critical( parent, caption, text,
|
||||
+ button0Text, button1Text, button2Text, defaultButtonNumber, escapeButtonNumber );
|
||||
+#endif
|
||||
return textBox( parent, Critical, caption, text,
|
||||
button0Text, button1Text, button2Text,
|
||||
defaultButtonNumber, escapeButtonNumber );
|
||||
--- src/kernel/qt.h
|
||||
+++ src/kernel/qt.h
|
||||
@@ -313,6 +313,10 @@
|
||||
#endif // Private headers
|
||||
|
||||
|
||||
+#ifdef Q_WS_X11
|
||||
+#include "private/qtkdeintegration_x11_p.h"
|
||||
+#endif
|
||||
+
|
||||
#ifdef Q_WS_MAC
|
||||
#include <qaquastyle.h>
|
||||
#include <qmacstyle_mac.h>
|
||||
--- src/kernel/qt_x11.pri
|
||||
+++ src/kernel/qt_x11.pri
|
||||
@@ -10,6 +10,9 @@
|
||||
|
||||
SOURCES += $$KERNEL_CPP/qtaddons_x11.cpp
|
||||
PRECOMPILED_HEADER = kernel/qt_pch.h
|
||||
+
|
||||
+ SOURCES += $$KERNEL_CPP/qtkdeintegration_x11.cpp
|
||||
+ HEADERS += $$KERNEL_H/qtkdeintegration_x11_p.h
|
||||
}
|
||||
|
||||
nas {
|
Binary file not shown.
@ -0,0 +1,22 @@
|
||||
--- src/tools/qglobal.h
|
||||
+++ src/tools/qglobal.h
|
||||
@@ -317,7 +317,7 @@
|
||||
supposedly know what you are doing.) */
|
||||
# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
|
||||
# define Q_PACKED __attribute__ ((packed))
|
||||
-# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
|
||||
+# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ > 3
|
||||
# define Q_NO_PACKED_REFERENCE
|
||||
# endif
|
||||
# endif
|
||||
--- src/tools/qstring.h
|
||||
+++ src/tools/qstring.h
|
||||
@@ -194,7 +194,7 @@
|
||||
char latin1() const { return ucs > 0xff ? 0 : (char) ucs; }
|
||||
ushort unicode() const { return ucs; }
|
||||
#ifdef Q_NO_PACKED_REFERENCE
|
||||
- ushort &unicode() { return *(&ucs); }
|
||||
+ ushort &unicode() { return *((ushort*)&ucs); }
|
||||
#else
|
||||
ushort &unicode() { return ucs; }
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,297 @@
|
||||
#
|
||||
# spec file for package qt3-devel-doc
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: qt3-devel-doc
|
||||
BuildRequires: cups-devel freeglut-devel freetype2-devel gcc-c++ pkgconfig qt3-devel update-desktop-files
|
||||
%if %suse_version < 1130
|
||||
BuildRequires: libpng-devel
|
||||
%else
|
||||
BuildRequires: libpng14-devel
|
||||
%endif
|
||||
Url: http://www.trolltech.com/
|
||||
License: GPL, QPL
|
||||
AutoReqProv: on
|
||||
Summary: Documentation for the Qt 3 Development Kit
|
||||
Group: Documentation/HTML
|
||||
Version: 3.3.8c
|
||||
Release: 1
|
||||
PreReq: /bin/grep
|
||||
BuildArch: noarch
|
||||
Provides: qt3-devel-tutorial
|
||||
Obsoletes: qt3-devel-tutorial
|
||||
Requires: qt3-devel
|
||||
%define x11_free -x11-free-
|
||||
%define rversion %version
|
||||
# COMMON-BEGIN
|
||||
# COMMON-BEGIN
|
||||
%define x11_free -x11-free-
|
||||
%define rversion 3.3.8b
|
||||
Source0: qt%{x11_free}%rversion.tar.bz2
|
||||
Source1: build_script.sh
|
||||
Source2: qtconfig3.desktop
|
||||
Source3: qtrc
|
||||
Source4: assistant3.png
|
||||
Source6: assistant3.desktop
|
||||
Source7: designer.desktop
|
||||
Source8: designer.png
|
||||
Source9: linguist.desktop
|
||||
Source5: linguist.png
|
||||
Source10: qt3.sh
|
||||
Source11: qt3.csh
|
||||
# Translations did not change at 3.3.8c
|
||||
Source12: qt3-3.3.8b-translations.tar.bz2
|
||||
Source100: qtkdeintegration_x11.cpp
|
||||
Source101: qtkdeintegration_x11_p.h
|
||||
Source102: baselibs.conf
|
||||
Source200: attributes
|
||||
Source201: update_spec.pl
|
||||
Patch1: aliasing.diff
|
||||
Patch2: head.diff
|
||||
Patch4: qt3-never-strip.diff
|
||||
Patch5: external-libs.diff
|
||||
Patch6: 0001-dnd_optimization.patch
|
||||
Patch7: 0002-dnd_active_window_fix.patch
|
||||
Patch8: 0007-qpixmap_constants.patch
|
||||
Patch11: 0038-dragobject-dont-prefer-unknown.patch
|
||||
Patch12: qtrc-path.diff
|
||||
Patch14: lib64-plugin-support.diff
|
||||
Patch15: pluginmanager-fix.diff
|
||||
Patch18: no-rpath.dif
|
||||
Patch19: shut-up.diff
|
||||
Patch20: rubberband.diff
|
||||
Patch21: fix-GL-loading.diff
|
||||
Patch23: fix-accessible.diff
|
||||
# From http://www.freedesktop.org/wiki/Software_2fImmoduleQtDownload
|
||||
# Current version from http://freedesktop.org/~daisuke/qt-x11-immodule-unified-qt3.3.5-20060318.diff.bz2
|
||||
Patch25: qt-x11-immodule-unified-qt3.3.8-20060318.diff
|
||||
Patch28: fix-key-release-event-with-imm.diff
|
||||
Patch29: 0047-fix-kmenu-width.diff
|
||||
Patch31: limit-image-size.diff
|
||||
Patch34: 0005-qpixmap_mitshm.patch
|
||||
Patch35: qt-transparency.patch
|
||||
Patch37: 0055-qtextedit_zoom.patch
|
||||
Patch38: 0048-qclipboard_hack_80072.patch
|
||||
Patch39: fix-qtranslator-crash.diff
|
||||
Patch40: 0059-qpopup_has_mouse.patch
|
||||
Patch41: 0060-qpopup_ignore_mousepos.patch
|
||||
Patch42: add_qexport_visibility.patch
|
||||
Patch43: 0056-khotkeys_input_84434.patch
|
||||
Source250: enable-designer-plugins.diff
|
||||
Patch53: fix-xinerama-dialog-placement.diff
|
||||
Patch54: kmenu-search-fix.diff
|
||||
Patch55: qt3-fix-cast.diff
|
||||
Patch100: qt.patch
|
||||
Patch101: qt3-arm-gcc4.patch
|
||||
Patch102: xinerama.patch
|
||||
Patch113: fix-assistant-path.patch
|
||||
Patch117: qtimer-debug.diff
|
||||
Patch119: xinerama-qpopupmenu.diff
|
||||
Patch121: qt3-warnings.diff
|
||||
Patch123: use-xrandr-1.2.diff
|
||||
Patch125: qcstring-format-warnings.diff
|
||||
Patch127: mng-reading-fix.patch
|
||||
Patch128: 0079-compositing-types.patch
|
||||
Patch129: 0080-net-wm-sync-request.patch
|
||||
Patch132: revert-qt-3.3.8-khmer-fix.diff
|
||||
Patch133: 0085-fix-buildkey.diff
|
||||
Patch134: fix-xinput-clash.diff
|
||||
Patch135: parseFontName.diff
|
||||
Patch136: qt3-no-date.diff
|
||||
Patch137: popen-leak-fix.diff
|
||||
Patch138: qt3-libpng14.diff
|
||||
Patch139: gcc46.diff
|
||||
|
||||
# TQt integration
|
||||
Patch200: qt-3.3.8c.diff
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
This package contains the documentation for the Qt 3 Development Kit.
|
||||
|
||||
You will find documentation, precompiled examples, and a tutorial for
|
||||
getting started with Qt in /usr/lib/qt3/doc.
|
||||
|
||||
This package contains the documentation for the Qt 3 Development Kit.
|
||||
|
||||
You will find documentation, precompiled examples, and a tutorial for
|
||||
getting started with Qt in /usr/lib/qt3/doc.
|
||||
|
||||
This package contains the documentation for the Qt 3 Development Kit.
|
||||
|
||||
You will find documentation, precompiled examples, and a tutorial for
|
||||
getting started with Qt in /usr/lib/qt3/doc.
|
||||
|
||||
This package contains the documentation for the Qt 3 Development Kit.
|
||||
|
||||
You will find documentation, precompiled examples, and a tutorial for
|
||||
getting started with Qt in /usr/lib/qt3/doc.
|
||||
|
||||
%define build_sub_dirs src plugins/src tools/designer/uilib/ tools/designer/uic tools/qtconfig tools/assistant/lib tools/assistant tutorial
|
||||
|
||||
%prep
|
||||
%setup -q -n qt%{x11_free}%rversion
|
||||
%patch1
|
||||
%patch2
|
||||
%patch4
|
||||
%patch5
|
||||
%patch6
|
||||
%patch7
|
||||
%patch8
|
||||
%patch11
|
||||
%patch12
|
||||
if [ "%_lib" = "lib64" ]; then
|
||||
%patch14
|
||||
fi
|
||||
%patch15
|
||||
%patch18
|
||||
%patch19
|
||||
%patch20
|
||||
%patch23
|
||||
%patch25
|
||||
%patch28
|
||||
%patch29
|
||||
%patch31
|
||||
%patch34
|
||||
%patch35
|
||||
%patch37
|
||||
%patch38
|
||||
%patch39
|
||||
%patch40
|
||||
%patch41
|
||||
%patch42
|
||||
%patch43
|
||||
%patch100
|
||||
%patch102
|
||||
%patch53
|
||||
%patch54
|
||||
%patch55
|
||||
%patch101
|
||||
%patch113
|
||||
%patch117
|
||||
%patch119
|
||||
%patch121
|
||||
%patch123
|
||||
ln -sf $PWD/src/inputmethod/qinputcontextfactory.h include/
|
||||
ln -sf $PWD/src/inputmethod/qinputcontextplugin.h include/
|
||||
ln -sf $PWD/src/kernel/qinputcontext.h include/
|
||||
ln -sf $PWD/src/kernel/qinputcontextinterface_p.h include/private/
|
||||
ln -sf $PWD/src/kernel/qximinputcontext_p.h include/private/
|
||||
if [ %_lib = "lib" ]; then
|
||||
sed 's,/lib64/,/lib/,' %PATCH21 | patch -p0
|
||||
else
|
||||
%patch21
|
||||
fi
|
||||
%patch125
|
||||
%patch127
|
||||
%patch128
|
||||
%patch129
|
||||
%patch132
|
||||
%patch133
|
||||
%patch134
|
||||
%patch135
|
||||
%patch136
|
||||
%patch137
|
||||
%if %suse_version > 1120
|
||||
%patch138 -p1
|
||||
%endif
|
||||
%patch139
|
||||
%patch200
|
||||
# copy qt kde integration files
|
||||
cp %SOURCE100 %SOURCE101 src/kernel/
|
||||
cp %SOURCE101 include/private/
|
||||
cd translations
|
||||
tar xvjf %SOURCE12
|
||||
cd ..
|
||||
# COMMON-END
|
||||
# COMMON-END
|
||||
|
||||
%description
|
||||
This package contains the documentation for the Qt 3 Development Kit.
|
||||
|
||||
You will find documentation, precompiled examples, and a tutorial for
|
||||
getting started with Qt in /usr/lib/qt3/doc.
|
||||
|
||||
This package contains the documentation for the Qt 3 Development Kit.
|
||||
|
||||
You will find documentation, precompiled examples, and a tutorial for
|
||||
getting started with Qt in /usr/lib/qt3/doc.
|
||||
|
||||
This package contains the documentation for the Qt 3 Development Kit.
|
||||
|
||||
You will find documentation, precompiled examples, and a tutorial for
|
||||
getting started with Qt in /usr/lib/qt3/doc.
|
||||
|
||||
This package contains the documentation for the Qt 3 Development Kit.
|
||||
|
||||
You will find documentation, precompiled examples, and a tutorial for
|
||||
getting started with Qt in /usr/lib/qt3/doc.
|
||||
|
||||
%build
|
||||
export VERSION=%suse_version
|
||||
source %SOURCE1 %{version}
|
||||
export WLIB=%_lib
|
||||
export QTDIR=`pwd`
|
||||
if [ %_lib == "lib64" ]; then
|
||||
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DUSE_LIB64_PATHES"
|
||||
fi
|
||||
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
#
|
||||
# call build from build_script.rpmrc for threaded Qt library
|
||||
# only really needed tools will be builded here, all extra tools will be
|
||||
# builded in qt3.spec
|
||||
#
|
||||
call_configure -thread -shared -no-sql-mysql -no-sql-psql -no-sql-odbc -no-sql-sqlite $OPTIONS
|
||||
cd src
|
||||
make %{?jobs:-j%jobs}
|
||||
cd ..
|
||||
|
||||
%install
|
||||
export VERSION=%suse_version
|
||||
export WLIB=%_lib
|
||||
export QTDIR=`pwd`
|
||||
source %SOURCE1 %{version}
|
||||
cd src
|
||||
make INSTALL_ROOT=$RPM_BUILD_ROOT install_htmldocs
|
||||
cd ..
|
||||
#
|
||||
# install menu entries
|
||||
#
|
||||
%suse_update_desktop_file -i -u qtconfig3 Qt Utility DesktopSettings
|
||||
%suse_update_desktop_file -i assistant3 Qt Development Documentation
|
||||
|
||||
install -d -m 0755 ${RPM_BUILD_ROOT}/%{_defaultdocdir}/qt3/
|
||||
ln -sf /usr/lib/qt3/doc/html ${RPM_BUILD_ROOT}/%{_defaultdocdir}/qt3/
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/
|
||||
install -m 0644 %SOURCE4 $RPM_BUILD_ROOT/usr/share/pixmaps/
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/lib/qt3/doc
|
||||
%doc /usr/lib/qt3/doc/html
|
||||
%{_docdir}/qt3/html
|
||||
/usr/share/applications/qtconfig3.desktop
|
||||
/usr/share/applications/assistant3.desktop
|
||||
/usr/share/pixmaps/assistant3.png
|
||||
|
||||
%changelog
|
@ -0,0 +1,93 @@
|
||||
#
|
||||
# spec file for package qt3 (Version 3.3.8b)
|
||||
#
|
||||
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
Name: qt3-devel-doc
|
||||
BuildRequires: cups-devel freeglut-devel freetype2-devel gcc-c++ pkgconfig update-desktop-files qt3-devel
|
||||
%if %suse_version < 1130
|
||||
BuildRequires: libpng-devel
|
||||
%else
|
||||
BuildRequires: libpng14-devel
|
||||
%endif
|
||||
URL: http://www.trolltech.com/
|
||||
License: GPL, QPL
|
||||
Autoreqprov: on
|
||||
Summary: Qt 3 Development Kit
|
||||
Group: Documentation/HTML
|
||||
Version: 3.3.8c
|
||||
Release: 1
|
||||
PreReq: /bin/grep
|
||||
BuildArch: noarch
|
||||
Provides: qt3-devel-tutorial
|
||||
Obsoletes: qt3-devel-tutorial
|
||||
Requires: qt3-devel
|
||||
%define x11_free -x11-free-
|
||||
%define rversion %version
|
||||
# COMMON-BEGIN
|
||||
# COMMON-END
|
||||
|
||||
%description
|
||||
You need this package if you want to compile programs with Qt 3. It
|
||||
contains the "Qt Crossplatform Development Kit 2". You will find
|
||||
include files, documentation, precompiled examples, and a tutorial for
|
||||
getting started with Qt in /usr/lib/qt3.
|
||||
|
||||
%build
|
||||
export VERSION=%suse_version
|
||||
source %SOURCE1 %{version}
|
||||
export WLIB=%_lib
|
||||
export QTDIR=`pwd`
|
||||
if [ %_lib == "lib64" ]; then
|
||||
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DUSE_LIB64_PATHES"
|
||||
fi
|
||||
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
#
|
||||
# call build from build_script.rpmrc for threaded Qt library
|
||||
# only really needed tools will be builded here, all extra tools will be
|
||||
# builded in qt3.spec
|
||||
#
|
||||
call_configure -thread -shared -no-sql-mysql -no-sql-psql -no-sql-odbc -no-sql-sqlite $OPTIONS
|
||||
cd src
|
||||
make %{?jobs:-j%jobs}
|
||||
cd ..
|
||||
|
||||
%install
|
||||
export VERSION=%suse_version
|
||||
export WLIB=%_lib
|
||||
export QTDIR=`pwd`
|
||||
source %SOURCE1 %{version}
|
||||
cd src
|
||||
make INSTALL_ROOT=$RPM_BUILD_ROOT install_htmldocs
|
||||
cd ..
|
||||
#
|
||||
# install menu entries
|
||||
#
|
||||
%suse_update_desktop_file -i -u qtconfig3 Qt Utility DesktopSettings
|
||||
%suse_update_desktop_file -i assistant3 Qt Development Documentation
|
||||
|
||||
install -d -m 0755 ${RPM_BUILD_ROOT}/%{_defaultdocdir}/qt3/
|
||||
ln -sf /usr/lib/qt3/doc/html ${RPM_BUILD_ROOT}/%{_defaultdocdir}/qt3/
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/
|
||||
install -m 0644 %SOURCE4 $RPM_BUILD_ROOT/usr/share/pixmaps/
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/lib/qt3/doc
|
||||
%doc /usr/lib/qt3/doc/html
|
||||
%{_docdir}/qt3/html
|
||||
/usr/share/applications/qtconfig3.desktop
|
||||
/usr/share/applications/assistant3.desktop
|
||||
/usr/share/pixmaps/assistant3.png
|
||||
|
||||
%changelog -n qt3
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,477 @@
|
||||
#
|
||||
# spec file for package qt3-extensions
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: qt3-extensions
|
||||
BuildRequires: cups-devel krb5-devel mysql-devel postgresql-devel qt3-devel sqlite2-devel unixODBC-devel update-desktop-files
|
||||
%if %suse_version > 1020
|
||||
BuildRequires: fdupes
|
||||
%endif
|
||||
License: GPL, QPL
|
||||
Version: 3.3.8c
|
||||
Release: 1
|
||||
AutoReqProv: on
|
||||
Requires: qt3 = %version
|
||||
Group: Development/Tools/Other
|
||||
Summary: Qt3 Extensions
|
||||
# COMMON-BEGIN
|
||||
# COMMON-BEGIN
|
||||
%define x11_free -x11-free-
|
||||
%define rversion 3.3.8b
|
||||
Source0: qt%{x11_free}%rversion.tar.bz2
|
||||
Source1: build_script.sh
|
||||
Source2: qtconfig3.desktop
|
||||
Source3: qtrc
|
||||
Source4: assistant3.png
|
||||
Source6: assistant3.desktop
|
||||
Source7: designer.desktop
|
||||
Source8: designer.png
|
||||
Source9: linguist.desktop
|
||||
Source5: linguist.png
|
||||
Source10: qt3.sh
|
||||
Source11: qt3.csh
|
||||
# Translations did not change at 3.3.8c
|
||||
Source12: qt3-3.3.8b-translations.tar.bz2
|
||||
Source100: qtkdeintegration_x11.cpp
|
||||
Source101: qtkdeintegration_x11_p.h
|
||||
Source102: baselibs.conf
|
||||
Source200: attributes
|
||||
Source201: update_spec.pl
|
||||
Patch1: aliasing.diff
|
||||
Patch2: head.diff
|
||||
Patch4: qt3-never-strip.diff
|
||||
Patch5: external-libs.diff
|
||||
Patch6: 0001-dnd_optimization.patch
|
||||
Patch7: 0002-dnd_active_window_fix.patch
|
||||
Patch8: 0007-qpixmap_constants.patch
|
||||
Patch11: 0038-dragobject-dont-prefer-unknown.patch
|
||||
Patch12: qtrc-path.diff
|
||||
Patch14: lib64-plugin-support.diff
|
||||
Patch15: pluginmanager-fix.diff
|
||||
Patch18: no-rpath.dif
|
||||
Patch19: shut-up.diff
|
||||
Patch20: rubberband.diff
|
||||
Patch21: fix-GL-loading.diff
|
||||
Patch23: fix-accessible.diff
|
||||
# From http://www.freedesktop.org/wiki/Software_2fImmoduleQtDownload
|
||||
# Current version from http://freedesktop.org/~daisuke/qt-x11-immodule-unified-qt3.3.5-20060318.diff.bz2
|
||||
Patch25: qt-x11-immodule-unified-qt3.3.8-20060318.diff
|
||||
Patch28: fix-key-release-event-with-imm.diff
|
||||
Patch29: 0047-fix-kmenu-width.diff
|
||||
Patch31: limit-image-size.diff
|
||||
Patch34: 0005-qpixmap_mitshm.patch
|
||||
Patch35: qt-transparency.patch
|
||||
Patch37: 0055-qtextedit_zoom.patch
|
||||
Patch38: 0048-qclipboard_hack_80072.patch
|
||||
Patch39: fix-qtranslator-crash.diff
|
||||
Patch40: 0059-qpopup_has_mouse.patch
|
||||
Patch41: 0060-qpopup_ignore_mousepos.patch
|
||||
Patch42: add_qexport_visibility.patch
|
||||
Patch43: 0056-khotkeys_input_84434.patch
|
||||
Source250: enable-designer-plugins.diff
|
||||
Patch53: fix-xinerama-dialog-placement.diff
|
||||
Patch54: kmenu-search-fix.diff
|
||||
Patch55: qt3-fix-cast.diff
|
||||
Patch100: qt.patch
|
||||
Patch101: qt3-arm-gcc4.patch
|
||||
Patch102: xinerama.patch
|
||||
Patch113: fix-assistant-path.patch
|
||||
Patch117: qtimer-debug.diff
|
||||
Patch119: xinerama-qpopupmenu.diff
|
||||
Patch121: qt3-warnings.diff
|
||||
Patch123: use-xrandr-1.2.diff
|
||||
Patch125: qcstring-format-warnings.diff
|
||||
Patch127: mng-reading-fix.patch
|
||||
Patch128: 0079-compositing-types.patch
|
||||
Patch129: 0080-net-wm-sync-request.patch
|
||||
Patch132: revert-qt-3.3.8-khmer-fix.diff
|
||||
Patch133: 0085-fix-buildkey.diff
|
||||
Patch134: fix-xinput-clash.diff
|
||||
Patch135: parseFontName.diff
|
||||
Patch136: qt3-no-date.diff
|
||||
Patch137: popen-leak-fix.diff
|
||||
Patch138: qt3-libpng14.diff
|
||||
Patch139: gcc46.diff
|
||||
|
||||
# TQt integration
|
||||
Patch200: qt-3.3.8c.diff
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
This package contains extension libraries for Qt 3, such as the
|
||||
Netscape plug-in modules.
|
||||
|
||||
This package contains extension libraries for Qt 3, such as the
|
||||
Netscape plug-in modules.
|
||||
|
||||
This package contains extension libraries for Qt 3, such as the
|
||||
Netscape plug-in modules.
|
||||
|
||||
This package contains extension libraries for Qt 3, such as the
|
||||
Netscape plug-in modules.
|
||||
|
||||
%define build_sub_dirs src plugins/src tools/designer/uilib/ tools/designer/uic tools/qtconfig tools/assistant/lib tools/assistant tutorial
|
||||
|
||||
%prep
|
||||
%setup -q -n qt%{x11_free}%rversion
|
||||
%patch1
|
||||
%patch2
|
||||
%patch4
|
||||
%patch5
|
||||
%patch6
|
||||
%patch7
|
||||
%patch8
|
||||
%patch11
|
||||
%patch12
|
||||
if [ "%_lib" = "lib64" ]; then
|
||||
%patch14
|
||||
fi
|
||||
%patch15
|
||||
%patch18
|
||||
%patch19
|
||||
%patch20
|
||||
%patch23
|
||||
%patch25
|
||||
%patch28
|
||||
%patch29
|
||||
%patch31
|
||||
%patch34
|
||||
%patch35
|
||||
%patch37
|
||||
%patch38
|
||||
%patch39
|
||||
%patch40
|
||||
%patch41
|
||||
%patch42
|
||||
%patch43
|
||||
%patch100
|
||||
%patch102
|
||||
%patch53
|
||||
%patch54
|
||||
%patch55
|
||||
%patch101
|
||||
%patch113
|
||||
%patch117
|
||||
%patch119
|
||||
%patch121
|
||||
%patch123
|
||||
ln -sf $PWD/src/inputmethod/qinputcontextfactory.h include/
|
||||
ln -sf $PWD/src/inputmethod/qinputcontextplugin.h include/
|
||||
ln -sf $PWD/src/kernel/qinputcontext.h include/
|
||||
ln -sf $PWD/src/kernel/qinputcontextinterface_p.h include/private/
|
||||
ln -sf $PWD/src/kernel/qximinputcontext_p.h include/private/
|
||||
if [ %_lib = "lib" ]; then
|
||||
sed 's,/lib64/,/lib/,' %PATCH21 | patch -p0
|
||||
else
|
||||
%patch21
|
||||
fi
|
||||
%patch125
|
||||
%patch127
|
||||
%patch128
|
||||
%patch129
|
||||
%patch132
|
||||
%patch133
|
||||
%patch134
|
||||
%patch135
|
||||
%patch136
|
||||
%patch137
|
||||
%if %suse_version > 1120
|
||||
%patch138 -p1
|
||||
%endif
|
||||
%patch139
|
||||
%patch200
|
||||
# copy qt kde integration files
|
||||
cp %SOURCE100 %SOURCE101 src/kernel/
|
||||
cp %SOURCE101 include/private/
|
||||
cd translations
|
||||
tar xvjf %SOURCE12
|
||||
cd ..
|
||||
# COMMON-END
|
||||
# COMMON-END
|
||||
|
||||
%description
|
||||
This package contains extension libraries for Qt 3, such as the
|
||||
Netscape plug-in modules.
|
||||
|
||||
This package contains extension libraries for Qt 3, such as the
|
||||
Netscape plug-in modules.
|
||||
|
||||
This package contains extension libraries for Qt 3, such as the
|
||||
Netscape plug-in modules.
|
||||
|
||||
This package contains extension libraries for Qt 3, such as the
|
||||
Netscape plug-in modules.
|
||||
|
||||
%package -n qt3-devel-examples
|
||||
Summary: Programming Examples for Qt 3
|
||||
AutoReqProv: on
|
||||
Group: Development/Sources
|
||||
Provides: qt3-examples
|
||||
Obsoletes: qt3-examples
|
||||
|
||||
%description -n qt3-devel-examples
|
||||
This package contains small executables with code to demonstrate Qt
|
||||
programming.
|
||||
|
||||
Have a look in /usr/share/doc/packages/qt3/examples/.
|
||||
|
||||
%package -n qt3-mysql
|
||||
Summary: MySQL Plug-In for Qt
|
||||
Provides: qt3_database_plugin
|
||||
Group: Productivity/Databases/Clients
|
||||
|
||||
%description -n qt3-mysql
|
||||
Plug-in for using the MySQL database with the generic Qt database
|
||||
interface.
|
||||
|
||||
%package -n qt3-unixODBC
|
||||
Summary: A UnixODBC Plug-In for Qt
|
||||
Provides: qt3_database_plugin
|
||||
Group: Productivity/Databases/Clients
|
||||
|
||||
%description -n qt3-unixODBC
|
||||
A plug-in for using UnixODBC supported databases with the generic Qt
|
||||
database interface.
|
||||
|
||||
%package -n qt3-postgresql
|
||||
Summary: A PostgreSQL Plug-In for Qt
|
||||
Provides: qt3_database_plugin
|
||||
Group: Productivity/Databases/Clients
|
||||
|
||||
%description -n qt3-postgresql
|
||||
A Plug-in for using the PostgreSQL database with the generic Qt
|
||||
database interface.
|
||||
|
||||
%package -n qt3-sqlite
|
||||
Summary: SQLite Database Plug-In for Qt
|
||||
Provides: qt3_database_plugin
|
||||
Group: Development/Tools/Other
|
||||
|
||||
%description -n qt3-sqlite
|
||||
The Qt database supports SQLite with this plug-in. (No configured and
|
||||
running daemon is required.)
|
||||
|
||||
%package -n qt3-devel-tools
|
||||
Summary: User Interface Builder and other tools (designer, assistant, linguist)
|
||||
AutoReqProv: on
|
||||
Requires: qt3-devel = %version
|
||||
Provides: qt3-designer
|
||||
Obsoletes: qt3-designer
|
||||
Group: Development/Tools/GUI Builders
|
||||
|
||||
%description -n qt3-devel-tools
|
||||
The designer creates .ui files. The uic generates C++ code from these
|
||||
files. The package also contains the Qt Assistant (Qt documentation
|
||||
browser) and the Qt Linguist (for translations).
|
||||
|
||||
%package -n qt3-man
|
||||
Summary: Qt 3 Man Pages
|
||||
AutoReqProv: on
|
||||
Requires: qt3-devel = %version
|
||||
Conflicts: qtman qt-man
|
||||
Group: Documentation/Man
|
||||
|
||||
%description -n qt3-man
|
||||
This package contains all the man pages for all the Qt 3 classes.
|
||||
|
||||
%build
|
||||
export QTDIR=/usr/lib/qt3/
|
||||
export WLIB=%_lib
|
||||
export VERSION=%suse_version
|
||||
source %{SOURCE1} %{version}
|
||||
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
#
|
||||
# compile threaded version to build all tools.
|
||||
# the lib itself becomes packaged from qt3.spec
|
||||
#
|
||||
call_configure -thread -shared -L$PWD/%_lib $OPTIONS
|
||||
ln -sf /usr/lib/qt3/%_lib/* lib/
|
||||
ln -sf /usr/lib/qt3/bin/* bin/
|
||||
cd plugins/src
|
||||
make %{?jobs:-j%jobs}
|
||||
make INSTALL_ROOT=$RPM_BUILD_ROOT install
|
||||
cd -
|
||||
#
|
||||
# build examples
|
||||
#
|
||||
cd tools/assistant/lib
|
||||
make %{?jobs:-j%jobs}
|
||||
cd -
|
||||
cd examples
|
||||
make %{?jobs:-j%jobs}
|
||||
cd -
|
||||
#
|
||||
# build extra tools
|
||||
#
|
||||
cd tools
|
||||
make %{?jobs:-j%jobs}
|
||||
make INSTALL_ROOT=$RPM_BUILD_ROOT install
|
||||
for i in qvfb qembed qconfig msg2qm mergetr ; do
|
||||
cd "$i" && make %{?jobs:-j%jobs} && install -m 0755 $i ${RPM_BUILD_ROOT}/usr/lib/qt3/bin/ && cd -
|
||||
done
|
||||
cd ..
|
||||
install -m 0755 bin/findtr bin/qt20fix bin/qtrename140 ${RPM_BUILD_ROOT}/usr/lib/qt3/bin/
|
||||
if [ %_lib = lib64 ]; then
|
||||
for i in $RPM_BUILD_ROOT/usr/lib/qt3/plugins/*/*.so; do
|
||||
mv "$i" "${i%.so}.lib64.so"
|
||||
done
|
||||
fi
|
||||
|
||||
%install
|
||||
export WLIB=%_lib
|
||||
export VERSION=%suse_version
|
||||
source %{SOURCE1}
|
||||
post_install $RPM_BUILD_ROOT/usr/lib/qt3/
|
||||
#
|
||||
# create default doc dir
|
||||
#
|
||||
install -d -m 0755 ${RPM_BUILD_ROOT}/%{_docdir}/qt3/
|
||||
#
|
||||
# create links in ld.so.conf path
|
||||
#
|
||||
install -d -m 0755 ${RPM_BUILD_ROOT}/%{_libdir}
|
||||
#install -d -m 0755 ${RPM_BUILD_ROOT}/usr/bin/
|
||||
#ln -sf ../lib/qt3/bin/designer ${RPM_BUILD_ROOT}/usr/bin/designer
|
||||
#ln -sf ../lib/qt3/bin/linguist ${RPM_BUILD_ROOT}/usr/bin/linguist
|
||||
%suse_update_desktop_file -i designer Qt Development GUIDesigner
|
||||
%suse_update_desktop_file -i linguist Qt Development Translation
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
|
||||
perl -pi -e 's/Icon=designer/Icon=designer3/' ${RPM_BUILD_ROOT}/usr/share/applications/designer.desktop
|
||||
perl -pi -e 's,Exec=designer,Exec=/usr/lib/qt3/bin/designer,' ${RPM_BUILD_ROOT}/usr/share/applications/designer.desktop
|
||||
mv ${RPM_BUILD_ROOT}/usr/share/applications/designer.desktop ${RPM_BUILD_ROOT}/usr/share/applications/designer3.desktop
|
||||
install -m 0644 tools/assistant/images/designer.png $RPM_BUILD_ROOT/usr/share/pixmaps/designer3.png
|
||||
rm -f ${RPM_BUILD_ROOT}/usr/share/pixmaps/designer.png
|
||||
perl -pi -e 's,Exec=linguist,Exec=/usr/lib/qt3/bin/linguist,' ${RPM_BUILD_ROOT}/usr/share/applications/linguist.desktop
|
||||
perl -pi -e 's,Icon=linguist,Icon=linguist3,' ${RPM_BUILD_ROOT}/usr/share/applications/linguist.desktop
|
||||
mv ${RPM_BUILD_ROOT}/usr/share/pixmaps/linguist.png ${RPM_BUILD_ROOT}/usr/share/pixmaps/linguist3.png
|
||||
|
||||
##### these files are not getting installed by "make install" ... bug ?
|
||||
#
|
||||
#
|
||||
# install manpages
|
||||
#
|
||||
rm -rf $RPM_BUILD_ROOT/%{_mandir}
|
||||
install -d $RPM_BUILD_ROOT/%{_mandir}
|
||||
cp -a doc/man/* $RPM_BUILD_ROOT/%{_mandir}/
|
||||
#
|
||||
# install examples
|
||||
#
|
||||
install -d ${RPM_BUILD_ROOT}/usr/lib/qt3/doc/
|
||||
find ./examples/ \
|
||||
-name \*.o -o -name .obj -o -name .moc -o -name Makefile \
|
||||
| xargs rm -rf
|
||||
cp -a examples ${RPM_BUILD_ROOT}/usr/lib/qt3/doc/
|
||||
ln -sf /usr/lib/qt3/doc/examples ${RPM_BUILD_ROOT}/%{_docdir}/qt3/
|
||||
#
|
||||
# to be sure we do not package files which are packaged in other qt3 packages
|
||||
#
|
||||
rpm -ql qt3 qt3-devel qt3-devel-doc \
|
||||
| while read i ; do
|
||||
[ -d "$i" ] || rm -f $RPM_BUILD_ROOT/"$i"
|
||||
done
|
||||
#
|
||||
# we do have them in qt3-devel-doc already
|
||||
#
|
||||
rm -f $RPM_BUILD_ROOT/usr/lib/qt3/bin/assistant
|
||||
rm -f $RPM_BUILD_ROOT/usr/lib/qt3/%_lib/libqassistantclient.*
|
||||
rm -f $RPM_BUILD_ROOT/usr/lib/qt3/translations/assistant_de.qm
|
||||
|
||||
for l in $RPM_BUILD_ROOT/usr/lib/qt3/%_lib/*.a; do
|
||||
strip --strip-unneeded $l
|
||||
done
|
||||
|
||||
%if %suse_version > 1020
|
||||
%fdupes -s $RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
%pre
|
||||
if test -L usr/lib/qt3; then
|
||||
rm usr/lib/qt3
|
||||
fi
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%post
|
||||
%run_ldconfig
|
||||
|
||||
%post -n qt3-devel-tools
|
||||
%run_ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
/usr/lib/qt3/bin/qembed
|
||||
/usr/lib/qt3/bin/qvfb
|
||||
|
||||
%files -n qt3-mysql
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/lib/qt3/plugins/sqldrivers
|
||||
/usr/lib/qt3/plugins/sqldrivers/libqsqlmysql*.so
|
||||
|
||||
%files -n qt3-postgresql
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/lib/qt3/plugins/sqldrivers
|
||||
/usr/lib/qt3/plugins/sqldrivers/libqsqlpsql*.so
|
||||
|
||||
%files -n qt3-unixODBC
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/lib/qt3/plugins/sqldrivers
|
||||
/usr/lib/qt3/plugins/sqldrivers/libqsqlodbc*.so
|
||||
|
||||
%files -n qt3-sqlite
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/lib/qt3/plugins/sqldrivers
|
||||
/usr/lib/qt3/plugins/sqldrivers/libqsqlite*.so
|
||||
|
||||
%files -n qt3-devel-tools
|
||||
%defattr(-,root,root)
|
||||
#/usr/bin/designer
|
||||
#/usr/bin/linguist
|
||||
/usr/lib/qt3/bin/qconfig
|
||||
/usr/lib/qt3/bin/findtr
|
||||
/usr/lib/qt3/bin/qt20fix
|
||||
/usr/lib/qt3/bin/qtrename140
|
||||
/usr/lib/qt3/bin/msg2qm
|
||||
/usr/lib/qt3/bin/mergetr
|
||||
/usr/lib/qt3/bin/designer
|
||||
/usr/lib/qt3/bin/linguist
|
||||
/usr/lib/qt3/bin/qm2ts
|
||||
/usr/lib/qt3/bin/lrelease
|
||||
/usr/lib/qt3/bin/lupdate
|
||||
/usr/lib/qt3/templates
|
||||
/usr/lib/qt3/plugins/designer
|
||||
/usr/lib/qt3/phrasebooks
|
||||
/usr/lib/qt3/%_lib/libdesignercore.*
|
||||
/usr/lib/qt3/%_lib/libeditor.*
|
||||
/usr/share/applications/*
|
||||
/usr/share/pixmaps/designer3.png
|
||||
/usr/share/pixmaps/linguist3.png
|
||||
|
||||
%files -n qt3-devel-examples
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/lib/qt3/doc
|
||||
/%{_docdir}/qt3/examples
|
||||
/usr/lib/qt3/doc/examples
|
||||
|
||||
%files -n qt3-man
|
||||
%defattr(-,root,root)
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
@ -0,0 +1,358 @@
|
||||
#
|
||||
# spec file for package qt3-extensions (Version 3.3.8b)
|
||||
#
|
||||
# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
Name: qt3-extensions
|
||||
BuildRequires: cups-devel krb5-devel mysql-devel postgresql-devel qt3-devel sqlite2-devel unixODBC-devel update-desktop-files
|
||||
%if %suse_version > 1020
|
||||
BuildRequires: fdupes
|
||||
%endif
|
||||
License: GPL, QPL
|
||||
Version: 3.3.8c
|
||||
Release: 1
|
||||
Autoreqprov: on
|
||||
Requires: qt3 = %version
|
||||
Group: Development/Tools/Other
|
||||
Summary: Qt3 Extensions
|
||||
# COMMON-BEGIN
|
||||
# COMMON-END
|
||||
|
||||
%description
|
||||
Qt is a program library for developing applications with graphical user
|
||||
interfaces. It allows you to rapidly develop professional programs. The
|
||||
Qt library is available not only for Linux but for a great number of
|
||||
Unices and even for Windows. Thus it is possible to write programs that
|
||||
may be easily ported to those platforms.
|
||||
|
||||
You need a license for using Qt with a non-GPL application, which can
|
||||
be acquired from sales@trolltech.com.
|
||||
|
||||
See /usr/share/doc/packages/qt3 for details about the new features of
|
||||
the current Qt library!
|
||||
|
||||
%package -n qt3-devel-examples
|
||||
Summary: Programming Examples for Qt 3
|
||||
Autoreqprov: on
|
||||
Group: Development/Sources
|
||||
Provides: qt3-examples
|
||||
Obsoletes: qt3-examples
|
||||
|
||||
%description -n qt3-devel-examples
|
||||
Qt is a program library for developing applications with graphical user
|
||||
interfaces. It allows you to rapidly develop professional programs. The
|
||||
Qt library is available not only for Linux but for a great number of
|
||||
Unices and even for Windows. Thus it is possible to write programs that
|
||||
may be easily ported to those platforms.
|
||||
|
||||
You need a license for using Qt with a non-GPL application, which can
|
||||
be acquired from sales@trolltech.com.
|
||||
|
||||
See /usr/share/doc/packages/qt3 for details about the new features of
|
||||
the current Qt library!
|
||||
|
||||
%package -n qt3-mysql
|
||||
Summary: MySQL Plug-In for Qt
|
||||
Provides: qt3_database_plugin
|
||||
Group: Productivity/Databases/Clients
|
||||
|
||||
%description -n qt3-mysql
|
||||
Qt is a program library for developing applications with graphical user
|
||||
interfaces. It allows you to rapidly develop professional programs. The
|
||||
Qt library is available not only for Linux but for a great number of
|
||||
Unices and even for Windows. Thus it is possible to write programs that
|
||||
may be easily ported to those platforms.
|
||||
|
||||
You need a license for using Qt with a non-GPL application, which can
|
||||
be acquired from sales@trolltech.com.
|
||||
|
||||
See /usr/share/doc/packages/qt3 for details about the new features of
|
||||
the current Qt library!
|
||||
|
||||
%package -n qt3-unixODBC
|
||||
Summary: A UnixODBC Plug-In for Qt
|
||||
Provides: qt3_database_plugin
|
||||
Group: Productivity/Databases/Clients
|
||||
|
||||
%description -n qt3-unixODBC
|
||||
Qt is a program library for developing applications with graphical user
|
||||
interfaces. It allows you to rapidly develop professional programs. The
|
||||
Qt library is available not only for Linux but for a great number of
|
||||
Unices and even for Windows. Thus it is possible to write programs that
|
||||
may be easily ported to those platforms.
|
||||
|
||||
You need a license for using Qt with a non-GPL application, which can
|
||||
be acquired from sales@trolltech.com.
|
||||
|
||||
See /usr/share/doc/packages/qt3 for details about the new features of
|
||||
the current Qt library!
|
||||
|
||||
%package -n qt3-postgresql
|
||||
Summary: A PostgreSQL Plug-In for Qt
|
||||
Provides: qt3_database_plugin
|
||||
Group: Productivity/Databases/Clients
|
||||
|
||||
%description -n qt3-postgresql
|
||||
Qt is a program library for developing applications with graphical user
|
||||
interfaces. It allows you to rapidly develop professional programs. The
|
||||
Qt library is available not only for Linux but for a great number of
|
||||
Unices and even for Windows. Thus it is possible to write programs that
|
||||
may be easily ported to those platforms.
|
||||
|
||||
You need a license for using Qt with a non-GPL application, which can
|
||||
be acquired from sales@trolltech.com.
|
||||
|
||||
See /usr/share/doc/packages/qt3 for details about the new features of
|
||||
the current Qt library!
|
||||
|
||||
%package -n qt3-sqlite
|
||||
Summary: SQLite Database Plug-In for Qt
|
||||
Provides: qt3_database_plugin
|
||||
Group: Development/Tools/Other
|
||||
|
||||
%description -n qt3-sqlite
|
||||
Qt is a program library for developing applications with graphical user
|
||||
interfaces. It allows you to rapidly develop professional programs. The
|
||||
Qt library is available not only for Linux but for a great number of
|
||||
Unices and even for Windows. Thus it is possible to write programs that
|
||||
may be easily ported to those platforms.
|
||||
|
||||
You need a license for using Qt with a non-GPL application, which can
|
||||
be acquired from sales@trolltech.com.
|
||||
|
||||
See /usr/share/doc/packages/qt3 for details about the new features of
|
||||
the current Qt library!
|
||||
|
||||
%package -n qt3-devel-tools
|
||||
Summary: User Interface Builder and other tools (designer, assistant, linguist)
|
||||
Autoreqprov: on
|
||||
Requires: qt3-devel = %version
|
||||
Provides: qt3-designer
|
||||
Obsoletes: qt3-designer
|
||||
Group: Development/Tools/GUI Builders
|
||||
|
||||
%description -n qt3-devel-tools
|
||||
Qt is a program library for developing applications with graphical user
|
||||
interfaces. It allows you to rapidly develop professional programs. The
|
||||
Qt library is available not only for Linux but for a great number of
|
||||
Unices and even for Windows. Thus it is possible to write programs that
|
||||
may be easily ported to those platforms.
|
||||
|
||||
You need a license for using Qt with a non-GPL application, which can
|
||||
be acquired from sales@trolltech.com.
|
||||
|
||||
See /usr/share/doc/packages/qt3 for details about the new features of
|
||||
the current Qt library!
|
||||
|
||||
%package -n qt3-man
|
||||
Summary: Qt 3 Man Pages
|
||||
Autoreqprov: on
|
||||
Requires: qt3-devel = %version
|
||||
Conflicts: qtman qt-man
|
||||
Group: Documentation/Man
|
||||
|
||||
%description -n qt3-man
|
||||
Qt is a program library for developing applications with graphical user
|
||||
interfaces. It allows you to rapidly develop professional programs. The
|
||||
Qt library is available not only for Linux but for a great number of
|
||||
Unices and even for Windows. Thus it is possible to write programs that
|
||||
may be easily ported to those platforms.
|
||||
|
||||
You need a license for using Qt with a non-GPL application, which can
|
||||
be acquired from sales@trolltech.com.
|
||||
|
||||
See /usr/share/doc/packages/qt3 for details about the new features of
|
||||
the current Qt library!
|
||||
|
||||
%build
|
||||
export QTDIR=/usr/lib/qt3/
|
||||
export WLIB=%_lib
|
||||
export VERSION=%suse_version
|
||||
source %{SOURCE1} %{version}
|
||||
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
#
|
||||
# compile threaded version to build all tools.
|
||||
# the lib itself becomes packaged from qt3.spec
|
||||
#
|
||||
call_configure -thread -shared -L$PWD/%_lib $OPTIONS
|
||||
ln -sf /usr/lib/qt3/%_lib/* lib/
|
||||
ln -sf /usr/lib/qt3/bin/* bin/
|
||||
cd plugins/src
|
||||
make %{?jobs:-j%jobs}
|
||||
make INSTALL_ROOT=$RPM_BUILD_ROOT install
|
||||
cd -
|
||||
#
|
||||
# build examples
|
||||
#
|
||||
cd tools/assistant/lib
|
||||
make %{?jobs:-j%jobs}
|
||||
cd -
|
||||
cd examples
|
||||
make %{?jobs:-j%jobs}
|
||||
cd -
|
||||
#
|
||||
# build extra tools
|
||||
#
|
||||
cd tools
|
||||
make %{?jobs:-j%jobs}
|
||||
make INSTALL_ROOT=$RPM_BUILD_ROOT install
|
||||
for i in qvfb qembed qconfig msg2qm mergetr ; do
|
||||
cd "$i" && make %{?jobs:-j%jobs} && install -m 0755 $i ${RPM_BUILD_ROOT}/usr/lib/qt3/bin/ && cd -
|
||||
done
|
||||
cd ..
|
||||
install -m 0755 bin/findtr bin/qt20fix bin/qtrename140 ${RPM_BUILD_ROOT}/usr/lib/qt3/bin/
|
||||
if [ %_lib = lib64 ]; then
|
||||
for i in $RPM_BUILD_ROOT/usr/lib/qt3/plugins/*/*.so; do
|
||||
mv "$i" "${i%.so}.lib64.so"
|
||||
done
|
||||
fi
|
||||
|
||||
%install
|
||||
export WLIB=%_lib
|
||||
export VERSION=%suse_version
|
||||
source %{SOURCE1}
|
||||
post_install $RPM_BUILD_ROOT/usr/lib/qt3/
|
||||
#
|
||||
# create default doc dir
|
||||
#
|
||||
install -d -m 0755 ${RPM_BUILD_ROOT}/%{_docdir}/qt3/
|
||||
#
|
||||
# create links in ld.so.conf path
|
||||
#
|
||||
install -d -m 0755 ${RPM_BUILD_ROOT}/%{_libdir}
|
||||
#install -d -m 0755 ${RPM_BUILD_ROOT}/usr/bin/
|
||||
#ln -sf ../lib/qt3/bin/designer ${RPM_BUILD_ROOT}/usr/bin/designer
|
||||
#ln -sf ../lib/qt3/bin/linguist ${RPM_BUILD_ROOT}/usr/bin/linguist
|
||||
%suse_update_desktop_file -i designer Qt Development GUIDesigner
|
||||
%suse_update_desktop_file -i linguist Qt Development Translation
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
|
||||
perl -pi -e 's/Icon=designer/Icon=designer3/' ${RPM_BUILD_ROOT}/usr/share/applications/designer.desktop
|
||||
perl -pi -e 's,Exec=designer,Exec=/usr/lib/qt3/bin/designer,' ${RPM_BUILD_ROOT}/usr/share/applications/designer.desktop
|
||||
mv ${RPM_BUILD_ROOT}/usr/share/applications/designer.desktop ${RPM_BUILD_ROOT}/usr/share/applications/designer3.desktop
|
||||
install -m 0644 tools/assistant/images/designer.png $RPM_BUILD_ROOT/usr/share/pixmaps/designer3.png
|
||||
rm -f ${RPM_BUILD_ROOT}/usr/share/pixmaps/designer.png
|
||||
perl -pi -e 's,Exec=linguist,Exec=/usr/lib/qt3/bin/linguist,' ${RPM_BUILD_ROOT}/usr/share/applications/linguist.desktop
|
||||
perl -pi -e 's,Icon=linguist,Icon=linguist3,' ${RPM_BUILD_ROOT}/usr/share/applications/linguist.desktop
|
||||
mv ${RPM_BUILD_ROOT}/usr/share/pixmaps/linguist.png ${RPM_BUILD_ROOT}/usr/share/pixmaps/linguist3.png
|
||||
|
||||
##### these files are not getting installed by "make install" ... bug ?
|
||||
#
|
||||
#
|
||||
# install manpages
|
||||
#
|
||||
rm -rf $RPM_BUILD_ROOT/%{_mandir}
|
||||
install -d $RPM_BUILD_ROOT/%{_mandir}
|
||||
cp -a doc/man/* $RPM_BUILD_ROOT/%{_mandir}/
|
||||
#
|
||||
# install examples
|
||||
#
|
||||
install -d ${RPM_BUILD_ROOT}/usr/lib/qt3/doc/
|
||||
find ./examples/ \
|
||||
-name \*.o -o -name .obj -o -name .moc -o -name Makefile \
|
||||
| xargs rm -rf
|
||||
cp -a examples ${RPM_BUILD_ROOT}/usr/lib/qt3/doc/
|
||||
ln -sf /usr/lib/qt3/doc/examples ${RPM_BUILD_ROOT}/%{_docdir}/qt3/
|
||||
#
|
||||
# to be sure we do not package files which are packaged in other qt3 packages
|
||||
#
|
||||
rpm -ql qt3 qt3-devel qt3-devel-doc \
|
||||
| while read i ; do
|
||||
[ -d "$i" ] || rm -f $RPM_BUILD_ROOT/"$i"
|
||||
done
|
||||
#
|
||||
# we do have them in qt3-devel-doc already
|
||||
#
|
||||
rm -f $RPM_BUILD_ROOT/usr/lib/qt3/bin/assistant
|
||||
rm -f $RPM_BUILD_ROOT/usr/lib/qt3/%_lib/libqassistantclient.*
|
||||
rm -f $RPM_BUILD_ROOT/usr/lib/qt3/translations/assistant_de.qm
|
||||
|
||||
for l in $RPM_BUILD_ROOT/usr/lib/qt3/%_lib/*.a; do
|
||||
strip --strip-unneeded $l
|
||||
done
|
||||
|
||||
%if %suse_version > 1020
|
||||
%fdupes -s $RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
|
||||
%pre
|
||||
if test -L usr/lib/qt3; then
|
||||
rm usr/lib/qt3
|
||||
fi
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%post
|
||||
%run_ldconfig
|
||||
|
||||
%post -n qt3-devel-tools
|
||||
%run_ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
/usr/lib/qt3/bin/qembed
|
||||
/usr/lib/qt3/bin/qvfb
|
||||
|
||||
%files -n qt3-mysql
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/lib/qt3/plugins/sqldrivers
|
||||
/usr/lib/qt3/plugins/sqldrivers/libqsqlmysql*.so
|
||||
|
||||
%files -n qt3-postgresql
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/lib/qt3/plugins/sqldrivers
|
||||
/usr/lib/qt3/plugins/sqldrivers/libqsqlpsql*.so
|
||||
|
||||
%files -n qt3-unixODBC
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/lib/qt3/plugins/sqldrivers
|
||||
/usr/lib/qt3/plugins/sqldrivers/libqsqlodbc*.so
|
||||
|
||||
%files -n qt3-sqlite
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/lib/qt3/plugins/sqldrivers
|
||||
/usr/lib/qt3/plugins/sqldrivers/libqsqlite*.so
|
||||
|
||||
%files -n qt3-devel-tools
|
||||
%defattr(-,root,root)
|
||||
#/usr/bin/designer
|
||||
#/usr/bin/linguist
|
||||
/usr/lib/qt3/bin/qconfig
|
||||
/usr/lib/qt3/bin/findtr
|
||||
/usr/lib/qt3/bin/qt20fix
|
||||
/usr/lib/qt3/bin/qtrename140
|
||||
/usr/lib/qt3/bin/msg2qm
|
||||
/usr/lib/qt3/bin/mergetr
|
||||
/usr/lib/qt3/bin/designer
|
||||
/usr/lib/qt3/bin/linguist
|
||||
/usr/lib/qt3/bin/qm2ts
|
||||
/usr/lib/qt3/bin/lrelease
|
||||
/usr/lib/qt3/bin/lupdate
|
||||
/usr/lib/qt3/templates
|
||||
/usr/lib/qt3/plugins/designer
|
||||
/usr/lib/qt3/phrasebooks
|
||||
/usr/lib/qt3/%_lib/libdesignercore.*
|
||||
/usr/lib/qt3/%_lib/libeditor.*
|
||||
/usr/share/applications/*
|
||||
/usr/share/pixmaps/designer3.png
|
||||
/usr/share/pixmaps/linguist3.png
|
||||
|
||||
%files -n qt3-devel-examples
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/lib/qt3/doc
|
||||
/%{_docdir}/qt3/examples
|
||||
/usr/lib/qt3/doc/examples
|
||||
|
||||
%files -n qt3-man
|
||||
%defattr(-,root,root)
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog -n qt3-extensions
|
@ -0,0 +1,13 @@
|
||||
Index: tools/qvfb/qvfbview.cpp
|
||||
================================================================================
|
||||
--- tools/qvfb/qvfbview.cpp
|
||||
+++ tools/qvfb/qvfbview.cpp
|
||||
@@ -115,7 +115,7 @@
|
||||
data = (unsigned char *)shmat( shmId, 0, 0 );
|
||||
}
|
||||
|
||||
- if ( (int)data == -1 )
|
||||
+ if ( (long)data == -1 )
|
||||
qFatal( "Cannot attach to shared memory" );
|
||||
|
||||
hdr = (QVFbHeader *)data;
|
@ -0,0 +1,22 @@
|
||||
Index: qt-x11-free-3.3.8b/src/kernel/qpngio.cpp
|
||||
===================================================================
|
||||
--- qt-x11-free-3.3.8b.orig/src/kernel/qpngio.cpp
|
||||
+++ qt-x11-free-3.3.8b/src/kernel/qpngio.cpp
|
||||
@@ -162,7 +162,7 @@ void setup_qt( QImage& image, png_struct
|
||||
image.setColor( i, qRgba(c,c,c,0xff) );
|
||||
}
|
||||
if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
|
||||
- const int g = info_ptr->trans_values.gray;
|
||||
+ const int g = info_ptr->trans_color.gray;
|
||||
if (g < ncols) {
|
||||
image.setAlphaBuffer(TRUE);
|
||||
image.setColor(g, image.color(g) & RGB_MASK);
|
||||
@@ -190,7 +190,7 @@ void setup_qt( QImage& image, png_struct
|
||||
info_ptr->palette[i].red,
|
||||
info_ptr->palette[i].green,
|
||||
info_ptr->palette[i].blue,
|
||||
- info_ptr->trans[i]
|
||||
+ info_ptr->trans_alpha[i]
|
||||
)
|
||||
);
|
||||
i++;
|
@ -0,0 +1,11 @@
|
||||
--- qmake/generators/unix/unixmake.cpp
|
||||
+++ qmake/generators/unix/unixmake.cpp
|
||||
@@ -836,7 +836,7 @@
|
||||
ret += "\n\t";
|
||||
ret += QString(resource ? "-$(INSTALL_DIR)" : "-$(INSTALL_FILE)") + " \"" +
|
||||
src_targ + "\" \"" + dst_targ + "\"";
|
||||
- if(!project->isActiveConfig("debug") && !project->isEmpty("QMAKE_STRIP") &&
|
||||
+ if(false && !project->isActiveConfig("debug") && !project->isEmpty("QMAKE_STRIP") &&
|
||||
(project->first("TEMPLATE") != "lib" || !project->isActiveConfig("staticlib"))) {
|
||||
ret += "\n\t-" + var("QMAKE_STRIP");
|
||||
if(project->first("TEMPLATE") == "lib" && !project->isEmpty("QMAKE_STRIPFLAGS_LIB"))
|
@ -0,0 +1,65 @@
|
||||
--- src/moc/moc.y 2008-01-15 20:09:13.000000000 +0100
|
||||
+++ src/moc/moc.y 2009-02-07 19:35:47.703930527 +0100
|
||||
@@ -2833,7 +2833,7 @@
|
||||
{
|
||||
const char *hdr1 = "/****************************************************************************\n"
|
||||
"** %s meta object code from reading C++ file '%s'\n**\n";
|
||||
- const char *hdr2 = "** Created: %s\n"
|
||||
+ const char *hdr2 = "** Created:\n"
|
||||
const char *hdr3 = "** WARNING! All changes made in this file will be lost!\n";
|
||||
const char *hdr4 = "*****************************************************************************/\n\n";
|
||||
int i;
|
||||
@@ -2872,7 +2872,7 @@
|
||||
if ( i >= 0 )
|
||||
fn = &g->fileName[i];
|
||||
fprintf( out, hdr1, (const char*)qualifiedClassName(),(const char*)fn);
|
||||
- fprintf( out, hdr2, (const char*)dstr );
|
||||
+ fprintf( out, hdr2 );
|
||||
fprintf( out, hdr3 );
|
||||
fprintf( out, hdr4 );
|
||||
|
||||
diff -ru src/moc/moc_yacc.cpp src/moc/moc_yacc.cpp
|
||||
--- src/moc/moc_yacc.cpp 2008-01-14 13:24:36.000000000 +0100
|
||||
+++ src/moc/moc_yacc.cpp 2009-02-07 19:35:30.039680400 +0100
|
||||
@@ -2872,7 +2872,7 @@
|
||||
{
|
||||
const char *hdr1 = "/****************************************************************************\n"
|
||||
"** %s meta object code from reading C++ file '%s'\n**\n";
|
||||
- const char *hdr2 = "** Created: %s\n"
|
||||
+ const char *hdr2 = "** Created: \n"
|
||||
"** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $)\n**\n";
|
||||
const char *hdr3 = "** WARNING! All changes made in this file will be lost!\n";
|
||||
const char *hdr4 = "*****************************************************************************/\n\n";
|
||||
@@ -2912,7 +2912,7 @@
|
||||
if ( i >= 0 )
|
||||
fn = &g->fileName[i];
|
||||
fprintf( out, hdr1, (const char*)qualifiedClassName(),(const char*)fn);
|
||||
- fprintf( out, hdr2, (const char*)dstr );
|
||||
+ fprintf( out, hdr2 );
|
||||
fprintf( out, hdr3 );
|
||||
fprintf( out, hdr4 );
|
||||
|
||||
diff -ru tools/designer/uic/embed.cpp tools/designer/uic/embed.cpp
|
||||
--- tools/designer/uic/embed.cpp 2008-01-15 20:09:14.000000000 +0100
|
||||
+++ tools/designer/uic/embed.cpp 2009-02-07 19:36:25.950931409 +0100
|
||||
@@ -137,7 +137,7 @@
|
||||
for ( it = images.begin(); it != images.end(); ++it )
|
||||
out << "** " << *it << "\n";
|
||||
out << "**\n";
|
||||
- out << "** Created: " << QDateTime::currentDateTime().toString() << "\n";
|
||||
+ out << "** Created:\n";
|
||||
out << "**\n";
|
||||
out << "** WARNING! All changes made in this file will be lost!\n";
|
||||
out << "****************************************************************************/\n";
|
||||
diff -ru tools/designer/uic/main.cpp tools/designer/uic/main.cpp
|
||||
--- tools/designer/uic/main.cpp 2008-01-15 20:09:14.000000000 +0100
|
||||
+++ tools/designer/uic/main.cpp 2009-02-07 19:36:36.603680916 +0100
|
||||
@@ -320,7 +320,7 @@
|
||||
out << "/****************************************************************************" << endl;
|
||||
out << "** Form "<< (impl? "implementation" : "interface") << " generated from reading ui file '" << fileName << "'" << endl;
|
||||
out << "**" << endl;
|
||||
- out << "** Created: " << QDateTime::currentDateTime().toString() << endl;
|
||||
+ out << "** Created:" << endl;
|
||||
out << "**" << endl;
|
||||
out << "** WARNING! All changes made in this file will be lost!" << endl;
|
||||
out << "****************************************************************************/" << endl << endl;
|
@ -0,0 +1,13 @@
|
||||
Index: src/kernel/qimage.h
|
||||
===================================================================
|
||||
--- src/kernel/qimage.h (revision 594273)
|
||||
+++ src/kernel/qimage.h (working copy)
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
QCString lang;
|
||||
|
||||
bool operator< (const QImageTextKeyLang& other) const
|
||||
- { return key < other.key || key==other.key && lang < other.lang; }
|
||||
+ { return key < other.key || (key==other.key && lang < other.lang); }
|
||||
bool operator== (const QImageTextKeyLang& other) const
|
||||
{ return key==other.key && lang==other.lang; }
|
||||
};
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,2 @@
|
||||
set -l path=($path /usr/lib/qt3/bin)
|
||||
setenv QTDIR /usr/lib/qt3
|
@ -0,0 +1,6 @@
|
||||
case ":${PATH}:" in
|
||||
*:/usr/lib/qt3/bin:*) ;;
|
||||
*) PATH=$PATH:/usr/lib/qt3/bin
|
||||
esac
|
||||
QTDIR=/usr/lib/qt3
|
||||
export QTDIR
|
@ -0,0 +1,415 @@
|
||||
#
|
||||
# spec file for package qt3
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
|
||||
Name: qt3
|
||||
#Remember also to modify Requires in -devel package
|
||||
BuildRequires: Mesa-devel c++_compiler cups-devel freetype2-devel libjpeg-devel libmng-devel pkgconfig update-desktop-files xorg-x11-devel
|
||||
Url: http://www.trolltech.com/
|
||||
License: GPLv2 ; GPLv3 ; QPL ..
|
||||
%if %suse_version > 1120
|
||||
BuildRequires: libpng14-compat-devel
|
||||
%else
|
||||
BuildRequires: libpng-devel
|
||||
%endif
|
||||
Group: System/Libraries
|
||||
# bug437293
|
||||
%ifarch ppc64
|
||||
Obsoletes: qt3-64bit
|
||||
%endif
|
||||
#
|
||||
Summary: A library for developing applications with graphical user interfaces
|
||||
Version: 3.3.8c
|
||||
Release: 110
|
||||
Provides: qt_library_%version
|
||||
Recommends: kdelibs3-default-style
|
||||
PreReq: /bin/grep
|
||||
# COMMON-BEGIN
|
||||
%define x11_free -x11-free-
|
||||
%define rversion 3.3.8b
|
||||
Source0: qt%{x11_free}%rversion.tar.bz2
|
||||
Source1: build_script.sh
|
||||
Source2: qtconfig3.desktop
|
||||
Source3: qtrc
|
||||
Source4: assistant3.png
|
||||
Source6: assistant3.desktop
|
||||
Source7: designer.desktop
|
||||
Source8: designer.png
|
||||
Source9: linguist.desktop
|
||||
Source5: linguist.png
|
||||
Source10: qt3.sh
|
||||
Source11: qt3.csh
|
||||
# Translations did not change at 3.3.8c
|
||||
Source12: qt3-3.3.8b-translations.tar.bz2
|
||||
Source100: qtkdeintegration_x11.cpp
|
||||
Source101: qtkdeintegration_x11_p.h
|
||||
Source102: baselibs.conf
|
||||
Source200: attributes
|
||||
Source201: update_spec.pl
|
||||
Patch1: aliasing.diff
|
||||
Patch2: head.diff
|
||||
Patch4: qt3-never-strip.diff
|
||||
Patch5: external-libs.diff
|
||||
Patch6: 0001-dnd_optimization.patch
|
||||
Patch7: 0002-dnd_active_window_fix.patch
|
||||
Patch8: 0007-qpixmap_constants.patch
|
||||
Patch11: 0038-dragobject-dont-prefer-unknown.patch
|
||||
Patch12: qtrc-path.diff
|
||||
Patch14: lib64-plugin-support.diff
|
||||
Patch15: pluginmanager-fix.diff
|
||||
Patch18: no-rpath.dif
|
||||
Patch19: shut-up.diff
|
||||
Patch20: rubberband.diff
|
||||
Patch21: fix-GL-loading.diff
|
||||
Patch23: fix-accessible.diff
|
||||
# From http://www.freedesktop.org/wiki/Software_2fImmoduleQtDownload
|
||||
# Current version from http://freedesktop.org/~daisuke/qt-x11-immodule-unified-qt3.3.5-20060318.diff.bz2
|
||||
Patch25: qt-x11-immodule-unified-qt3.3.8-20060318.diff
|
||||
Patch28: fix-key-release-event-with-imm.diff
|
||||
Patch29: 0047-fix-kmenu-width.diff
|
||||
Patch31: limit-image-size.diff
|
||||
Patch34: 0005-qpixmap_mitshm.patch
|
||||
Patch35: qt-transparency.patch
|
||||
Patch37: 0055-qtextedit_zoom.patch
|
||||
Patch38: 0048-qclipboard_hack_80072.patch
|
||||
Patch39: fix-qtranslator-crash.diff
|
||||
Patch40: 0059-qpopup_has_mouse.patch
|
||||
Patch41: 0060-qpopup_ignore_mousepos.patch
|
||||
Patch42: add_qexport_visibility.patch
|
||||
Patch43: 0056-khotkeys_input_84434.patch
|
||||
Source250: enable-designer-plugins.diff
|
||||
Patch53: fix-xinerama-dialog-placement.diff
|
||||
Patch54: kmenu-search-fix.diff
|
||||
Patch55: qt3-fix-cast.diff
|
||||
Patch100: qt.patch
|
||||
Patch101: qt3-arm-gcc4.patch
|
||||
Patch102: xinerama.patch
|
||||
Patch113: fix-assistant-path.patch
|
||||
Patch117: qtimer-debug.diff
|
||||
Patch119: xinerama-qpopupmenu.diff
|
||||
Patch121: qt3-warnings.diff
|
||||
Patch123: use-xrandr-1.2.diff
|
||||
Patch125: qcstring-format-warnings.diff
|
||||
Patch127: mng-reading-fix.patch
|
||||
Patch128: 0079-compositing-types.patch
|
||||
Patch129: 0080-net-wm-sync-request.patch
|
||||
Patch132: revert-qt-3.3.8-khmer-fix.diff
|
||||
Patch133: 0085-fix-buildkey.diff
|
||||
Patch134: fix-xinput-clash.diff
|
||||
Patch135: parseFontName.diff
|
||||
Patch136: qt3-no-date.diff
|
||||
Patch137: popen-leak-fix.diff
|
||||
Patch138: qt3-libpng14.diff
|
||||
Patch139: gcc46.diff
|
||||
|
||||
# TQt integration
|
||||
Patch200: qt-3.3.8c.diff
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
Qt is a program library for developing applications with graphical user
|
||||
interfaces. It allows you to rapidly develop professional programs. The
|
||||
Qt library is available not only for Linux but for a great number of
|
||||
Unices and even for Windows. Thus it is possible to write programs that
|
||||
may be easily ported to those platforms.
|
||||
|
||||
You need a license for using Qt with a non-GPL application, which can
|
||||
be acquired from sales@trolltech.com.
|
||||
|
||||
See /usr/share/doc/packages/qt3 for details about the new features of
|
||||
the current Qt library!
|
||||
|
||||
%define build_sub_dirs src plugins/src tools/designer/uilib/ tools/designer/uic tools/qtconfig tools/assistant/lib tools/assistant tutorial
|
||||
|
||||
%prep
|
||||
%setup -q -n qt%{x11_free}%rversion
|
||||
%patch1
|
||||
%patch2
|
||||
%patch4
|
||||
%patch5
|
||||
%patch6
|
||||
%patch7
|
||||
%patch8
|
||||
%patch11
|
||||
%patch12
|
||||
if [ "%_lib" = "lib64" ]; then
|
||||
%patch14
|
||||
fi
|
||||
%patch15
|
||||
%patch18
|
||||
%patch19
|
||||
%patch20
|
||||
%patch23
|
||||
%patch25
|
||||
%patch28
|
||||
%patch29
|
||||
%patch31
|
||||
%patch34
|
||||
%patch35
|
||||
%patch37
|
||||
%patch38
|
||||
%patch39
|
||||
%patch40
|
||||
%patch41
|
||||
%patch42
|
||||
%patch43
|
||||
%patch100
|
||||
%patch102
|
||||
%patch53
|
||||
%patch54
|
||||
%patch55
|
||||
%patch101
|
||||
%patch113
|
||||
%patch117
|
||||
%patch119
|
||||
%patch121
|
||||
%patch123
|
||||
ln -sf $PWD/src/inputmethod/qinputcontextfactory.h include/
|
||||
ln -sf $PWD/src/inputmethod/qinputcontextplugin.h include/
|
||||
ln -sf $PWD/src/kernel/qinputcontext.h include/
|
||||
ln -sf $PWD/src/kernel/qinputcontextinterface_p.h include/private/
|
||||
ln -sf $PWD/src/kernel/qximinputcontext_p.h include/private/
|
||||
if [ %_lib = "lib" ]; then
|
||||
sed 's,/lib64/,/lib/,' %PATCH21 | patch -p0
|
||||
else
|
||||
%patch21
|
||||
fi
|
||||
%patch125
|
||||
%patch127
|
||||
%patch128
|
||||
%patch129
|
||||
%patch132
|
||||
%patch133
|
||||
%patch134
|
||||
%patch135
|
||||
%patch136
|
||||
%patch137
|
||||
%if %suse_version > 1120
|
||||
%patch138 -p1
|
||||
%endif
|
||||
%patch139
|
||||
%patch200
|
||||
# copy qt kde integration files
|
||||
cp %SOURCE100 %SOURCE101 src/kernel/
|
||||
cp %SOURCE101 include/private/
|
||||
cd translations
|
||||
tar xvjf %SOURCE12
|
||||
cd ..
|
||||
# COMMON-END
|
||||
|
||||
%package devel
|
||||
License: GPLv2 ; GPLv3 ; QPL ..
|
||||
Summary: Include Files and Libraries mandatory for Development
|
||||
Requires: qt3 = %version
|
||||
Requires: pkgconfig cups-devel freetype2-devel libmng-devel libjpeg-devel c++_compiler xorg-x11-devel
|
||||
%if %suse_version > 1120
|
||||
Recommends: libpng14-compat-devel
|
||||
Requires: libpng-devel
|
||||
%else
|
||||
Requires: libpng-devel
|
||||
%endif
|
||||
%if %suse_version > 1000
|
||||
Requires: Mesa-devel
|
||||
%else
|
||||
Requires: xorg-x11-Mesa xorg-x11-Mesa-devel
|
||||
%endif
|
||||
%ifnarch x86_64 s390x sparc64 ppc64 mips64
|
||||
Conflicts: devel_libs-32bit
|
||||
%endif
|
||||
# bug437293
|
||||
%ifarch ppc64
|
||||
Obsoletes: qt3-devel-64bit
|
||||
%endif
|
||||
#
|
||||
Group: Development/Libraries/X11
|
||||
|
||||
%description devel
|
||||
You need this package if you want to compile programs with Qt 3. It
|
||||
contains the "Qt Crossplatform Development Kit 2". Under /usr/lib/qt3
|
||||
you will find include files.
|
||||
|
||||
You need a license for using Qt with a non-GPL application. A license
|
||||
can be acquired at sales@trolltech.com.
|
||||
|
||||
%build
|
||||
export VERSION=%suse_version
|
||||
source %SOURCE1 %{version}
|
||||
export WLIB=%_lib
|
||||
export QTDIR=`pwd`
|
||||
if [ %_lib == "lib64" ]; then
|
||||
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DUSE_LIB64_PATHES"
|
||||
fi
|
||||
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
#
|
||||
# call build from build_script.rpmrc for threaded Qt library
|
||||
# only really needed tools will be builded here, all extra tools will be
|
||||
# builded in qt3.spec
|
||||
#
|
||||
call_configure -v -thread -shared -no-sql-mysql -no-sql-psql -no-sql-odbc -no-sql-sqlite $OPTIONS
|
||||
for i in %build_sub_dirs ; do
|
||||
cd $i
|
||||
make %{?jobs:-j%jobs}
|
||||
cd -
|
||||
done
|
||||
|
||||
%install
|
||||
export VERSION=%suse_version
|
||||
export WLIB=%_lib
|
||||
export QTDIR=`pwd`
|
||||
source %SOURCE1 %{version}
|
||||
for i in %build_sub_dirs ; do
|
||||
cd $i
|
||||
make INSTALL_ROOT=$RPM_BUILD_ROOT install
|
||||
cd -
|
||||
done
|
||||
post_install $RPM_BUILD_ROOT/usr/lib/qt3/
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/
|
||||
sed -i -e 's, on: .*,,' $RPM_BUILD_ROOT/usr/lib/qt3/%_lib/*.la
|
||||
#
|
||||
# copy additional files
|
||||
#
|
||||
install -m 0755 bin/qmake bin/moc ${RPM_BUILD_ROOT}/usr/lib/qt3/bin/
|
||||
install -m 0755 -d ${RPM_BUILD_ROOT}/usr/lib/qt3/translations/
|
||||
install -m 0644 translations/*.qm ${RPM_BUILD_ROOT}/usr/lib/qt3/translations/
|
||||
if [ %_lib = lib64 ]; then
|
||||
for i in $RPM_BUILD_ROOT/usr/lib/qt3/plugins/*/*.so; do
|
||||
mv "$i" "${i%.so}.lib64.so"
|
||||
done
|
||||
fi
|
||||
#
|
||||
# move pkgconfig files
|
||||
#
|
||||
mkdir -p $RPM_BUILD_ROOT/%_libdir/pkgconfig
|
||||
mv $RPM_BUILD_ROOT/usr/lib/qt3/%_lib/pkgconfig/*.pc \
|
||||
$RPM_BUILD_ROOT/%_libdir/pkgconfig
|
||||
rmdir $RPM_BUILD_ROOT/usr/lib/qt3/%_lib/pkgconfig
|
||||
#
|
||||
# move docs in doc dir
|
||||
#
|
||||
install -d -m 0755 ${RPM_BUILD_ROOT}/%{_defaultdocdir}/qt3/
|
||||
install -d -m 0755 ${RPM_BUILD_ROOT}/usr/lib/qt3/mkspecs/
|
||||
install -d -m 0755 ${RPM_BUILD_ROOT}/usr/lib/qt3/mkspecs/
|
||||
cp -a mkspecs/* ${RPM_BUILD_ROOT}/usr/lib/qt3/mkspecs/
|
||||
if [ %_lib == "lib64" ]; then
|
||||
ln -sf linux-g++-64 ${RPM_BUILD_ROOT}/usr/lib/qt3/mkspecs/default
|
||||
else
|
||||
ln -sf linux-g++ ${RPM_BUILD_ROOT}/usr/lib/qt3/mkspecs/default
|
||||
fi
|
||||
find ${RPM_BUILD_ROOT}/usr/lib/qt3/mkspecs -type f -perm /111 -print0 | xargs -0 chmod a-x
|
||||
#
|
||||
# create links in ld.so.conf path
|
||||
#
|
||||
install -d -m 0755 ${RPM_BUILD_ROOT}/%{_libdir}
|
||||
ln -sf ../lib/qt3/%{_lib}/libqt-mt.so.3 ${RPM_BUILD_ROOT}/%{_libdir}/libqt-mt.so.3
|
||||
ln -sf ../lib/qt3/%{_lib}/libqui.so.1 ${RPM_BUILD_ROOT}/%{_libdir}/libqui.so.1
|
||||
[ "lib" != "%{_lib}" ] && \
|
||||
ln -sf ../lib/qt3 ${RPM_BUILD_ROOT}/%{_libdir}/qt3
|
||||
mkdir -p ${RPM_BUILD_ROOT}/etc/profile.d
|
||||
install -m 644 %SOURCE10 %SOURCE11 ${RPM_BUILD_ROOT}/etc/profile.d
|
||||
#
|
||||
# default qt settings
|
||||
#
|
||||
mkdir -p ${RPM_BUILD_ROOT}/etc/X11
|
||||
mkdir -p ${RPM_BUILD_ROOT}/usr/lib/qt3/etc/
|
||||
ln -sf /etc/X11/ ${RPM_BUILD_ROOT}/usr/lib/qt3/etc/settings
|
||||
install -m 0644 %SOURCE3 ${RPM_BUILD_ROOT}/etc/X11/qtrc
|
||||
#
|
||||
# clean broken links
|
||||
#
|
||||
if [ %_lib == "lib64" ]; then
|
||||
rm ${RPM_BUILD_ROOT}/usr/lib/qt3/mkspecs/linux-g++-64/linux-g++-64
|
||||
else
|
||||
rm ${RPM_BUILD_ROOT}/usr/lib/qt3/mkspecs/linux-g++/linux-g++
|
||||
fi
|
||||
rm -rf ${RPM_BUILD_ROOT}/usr/lib/qt3/doc/html
|
||||
|
||||
%pre
|
||||
if test -L usr/lib/qt3; then
|
||||
rm usr/lib/qt3
|
||||
fi
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
if ! grep -q '^\[3.3\]' etc/X11/qtrc ; then
|
||||
echo "" >> etc/X11/qtrc
|
||||
echo "[3.3]" >> etc/X11/qtrc
|
||||
echo "libraryPath=/opt/kde3/lib64/kde3/plugins/:/opt/kde3/lib/kde3/plugins/" >> etc/X11/qtrc
|
||||
fi
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,755)
|
||||
# FIXME provide new changelog if kb9vqf will give one
|
||||
%doc changes-3.3.8b README* LICENSE* MANIFEST FAQ
|
||||
%dir /usr/lib/qt3/translations
|
||||
%dir /usr/lib/qt3
|
||||
%dir /usr/lib/qt3/bin
|
||||
%dir /usr/lib/qt3/%{_lib}
|
||||
%{_libdir}/libqt-mt.so.*
|
||||
%{_libdir}/libqui.so.*
|
||||
/usr/lib/qt3/bin/qtconfig
|
||||
/usr/lib/qt3/%{_lib}/libqt-mt.so.*
|
||||
/usr/lib/qt3/%{_lib}/libqui.so.*
|
||||
%dir /usr/lib/qt3/etc
|
||||
/usr/lib/qt3/etc/settings
|
||||
/usr/lib/qt3/plugins
|
||||
/usr/lib/qt3/bin/assistant
|
||||
%lang(de) /usr/lib/qt3/translations/assistant_de.qm
|
||||
%lang(ar) /usr/lib/qt3/translations/qt_ar.qm
|
||||
%lang(ca) /usr/lib/qt3/translations/qt_ca.qm
|
||||
%lang(cs) /usr/lib/qt3/translations/qt_cs.qm
|
||||
%lang(de) /usr/lib/qt3/translations/qt_de.qm
|
||||
%lang(es) /usr/lib/qt3/translations/qt_es.qm
|
||||
%lang(fr) /usr/lib/qt3/translations/qt_fr.qm
|
||||
%lang(he) /usr/lib/qt3/translations/qt_he.qm
|
||||
%lang(ru) /usr/lib/qt3/translations/qt_ru.qm
|
||||
%lang(sk) /usr/lib/qt3/translations/qt_sk.qm
|
||||
%lang(it) /usr/lib/qt3/translations/qt_it.qm
|
||||
%lang(ja) /usr/lib/qt3/translations/qt_ja.qm
|
||||
%lang(nb) /usr/lib/qt3/translations/qt_nb.qm
|
||||
%lang(pl) /usr/lib/qt3/translations/qt_pl.qm
|
||||
%lang(pt) /usr/lib/qt3/translations/qt_pt-br.qm
|
||||
%lang(pt) /usr/lib/qt3/translations/qt_pt.qm
|
||||
%lang(zh) /usr/lib/qt3/translations/qt_zh-cn.qm
|
||||
%lang(zh) /usr/lib/qt3/translations/qt_zh-tw.qm
|
||||
%config(noreplace) /etc/X11/qtrc
|
||||
%ifarch s390x sparc64 x86_64 ppc64 mips64
|
||||
%dir %{_libdir}/qt3
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,755)
|
||||
# FIXME provide new changelog if kb9vqf will give one
|
||||
%doc changes-3.3.8b
|
||||
/usr/lib/qt3/bin/moc
|
||||
/usr/lib/qt3/bin/qmake
|
||||
/usr/lib/qt3/bin/uic
|
||||
/usr/lib/qt3/include
|
||||
/usr/lib/qt3/%{_lib}/libqt-mt.la
|
||||
/usr/lib/qt3/%{_lib}/libqt-mt.so
|
||||
/usr/lib/qt3/%{_lib}/libqt-mt.prl
|
||||
/usr/lib/qt3/%{_lib}/libqui.so
|
||||
/usr/lib/qt3/%{_lib}/libqui.prl
|
||||
/usr/lib/qt3/mkspecs
|
||||
/%_libdir/pkgconfig/qt-mt.pc
|
||||
/usr/lib/qt3/%_lib/libqassistantclient.*
|
||||
%config /etc/profile.d/qt3.*
|
||||
|
||||
%changelog
|
@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Categories=Qt;Settings;
|
||||
Encoding=UTF-8
|
||||
Exec=/usr/lib/qt3/bin/qtconfig
|
||||
Name=Qt Settings
|
||||
X-KDE-StartupNotify=true
|
||||
Icon=designer3
|
||||
Terminal=false
|
||||
Type=Application
|
||||
|
@ -0,0 +1,48 @@
|
||||
--- src/kernel/qeventloop_unix.cpp
|
||||
+++ src/kernel/qeventloop_unix.cpp
|
||||
@@ -514,6 +528,17 @@
|
||||
return (tm->tv_sec*1000) + (tm->tv_usec/1000);
|
||||
}
|
||||
|
||||
+static QString fullName(QObject* obj)
|
||||
+{
|
||||
+ QString oname;
|
||||
+ if (obj && obj->name())
|
||||
+ oname = QString(obj->name()) + "(" + QString(obj->className()) + ")";
|
||||
+
|
||||
+ if (obj && obj->parent())
|
||||
+ return fullName(obj->parent()) + "/" + oname;
|
||||
+ return oname;
|
||||
+}
|
||||
+
|
||||
int QEventLoop::activateTimers()
|
||||
{
|
||||
if ( !timerList || !timerList->count() ) // no timers
|
||||
@@ -549,9 +574,27 @@
|
||||
t->timeout += t->interval;
|
||||
if ( t->timeout < currentTime )
|
||||
t->timeout = currentTime + t->interval;
|
||||
+ // prefer system clock ticks for low resolution timers
|
||||
+ // to save cpu power
|
||||
+ if (t->interval.tv_sec * 1000 + t->interval.tv_usec / 1000 >= 1000) {
|
||||
+ timeval drift;
|
||||
+ drift.tv_sec = 0;
|
||||
+ drift.tv_usec = (t->interval.tv_usec / 8) + (t->interval.tv_sec % 8) * 1000 * 1000 / 8;
|
||||
+ timeval synced = t->timeout + drift;
|
||||
+ if (synced.tv_usec < 2 * drift.tv_usec)
|
||||
+ synced.tv_usec = 0;
|
||||
+ t->timeout = synced;
|
||||
+ }
|
||||
insertTimer( t ); // relink timer
|
||||
if ( t->interval.tv_usec > 0 || t->interval.tv_sec > 0 )
|
||||
n_act++;
|
||||
+
|
||||
+ if (t->obj && getenv("QT_DEBUG_TIMER"))
|
||||
+ qDebug("qtimer: %ld/%s %d ms for %p/%s %s",
|
||||
+ getpid(), qApp && qApp->name() ? qApp->name() : "",
|
||||
+ t->interval.tv_sec * 1000 + t->interval.tv_usec / 1000,
|
||||
+ t->obj, fullName(t->obj).latin1(), t->obj->className());
|
||||
+
|
||||
QTimerEvent e( t->id );
|
||||
QApplication::sendEvent( t->obj, &e ); // send event
|
||||
if ( timerList->findRef( begin ) == -1 )
|
@ -0,0 +1,242 @@
|
||||
#define QT_CLEAN_NAMESPACE
|
||||
#include "qtkdeintegration_x11_p.h"
|
||||
|
||||
#include <qcolordialog.h>
|
||||
#include <qfiledialog.h>
|
||||
#include <qfontdialog.h>
|
||||
#include <qlibrary.h>
|
||||
#include <qregexp.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
bool QKDEIntegration::inited = false;
|
||||
bool QKDEIntegration::enable = false;
|
||||
|
||||
bool QKDEIntegration::enabled()
|
||||
{
|
||||
if( !inited )
|
||||
initLibrary();
|
||||
return enable;
|
||||
}
|
||||
|
||||
static QCString findLibrary()
|
||||
{
|
||||
if( getenv( "QT_NO_KDE_INTEGRATION" ) == NULL
|
||||
|| getenv( "QT_NO_KDE_INTEGRATION" )[ 0 ] == '0' )
|
||||
{
|
||||
#ifdef USE_LIB64_PATHES
|
||||
return "/opt/kde3/lib64/kde3/plugins/integration/libqtkde";
|
||||
#else
|
||||
return "/opt/kde3/lib/kde3/plugins/integration/libqtkde";
|
||||
#endif
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
inline static long widgetToWinId( const QWidget* w )
|
||||
{
|
||||
return w != NULL ? w->winId() : 0;
|
||||
}
|
||||
|
||||
inline static QFont fontPtrToFontRef( const QFont* f )
|
||||
{
|
||||
return f != NULL ? *f : QFont();
|
||||
}
|
||||
|
||||
// ---
|
||||
static bool (*qtkde_initializeIntegration)( );
|
||||
static QStringList (*qtkde_getOpenFileNames)( const QString& filter, QString* workingDirectory,
|
||||
long parent, const QCString& name, const QString& caption, QString* selectedFilter,
|
||||
bool multiple );
|
||||
static QString (*qtkde_getSaveFileName)( const QString& initialSelection, const QString& filter,
|
||||
QString* workingDirectory, long parent, const QCString& name, const QString& caption,
|
||||
QString* selectedFilter );
|
||||
static QString (*qtkde_getExistingDirectory)( const QString& initialDirectory, long parent,
|
||||
const QCString& name, const QString& caption );
|
||||
static QColor (*qtkde_getColor)( const QColor& color, long parent, const QCString& name );
|
||||
static QFont (*qtkde_getFont)( bool* ok, const QFont& def, long parent, const QCString& name );
|
||||
static int (*qtkde_messageBox1)( int type, long parent, const QString& caption, const QString& text,
|
||||
int button0, int button1, int button2 );
|
||||
static int (*qtkde_messageBox2)( int type, long parent, const QString& caption, const QString& text,
|
||||
const QString& button0Text, const QString& button1Text, const QString& button2Text,
|
||||
int defaultButton, int escapeButton );
|
||||
|
||||
void QKDEIntegration::initLibrary()
|
||||
{
|
||||
if( !inited )
|
||||
{
|
||||
enable = false;
|
||||
inited = true;
|
||||
QString libpath = findLibrary();
|
||||
if( libpath.isEmpty())
|
||||
return;
|
||||
QLibrary lib( libpath );
|
||||
lib.setAutoUnload( false );
|
||||
qtkde_initializeIntegration = (
|
||||
bool (*)( )
|
||||
)
|
||||
lib.resolve("initializeIntegration");
|
||||
if( qtkde_initializeIntegration == NULL )
|
||||
return;
|
||||
qtkde_getOpenFileNames = (
|
||||
QStringList (*)( const QString& filter, QString* workingDirectory, long parent,
|
||||
const QCString& name, const QString& caption, QString* selectedFilter,
|
||||
bool multiple )
|
||||
)
|
||||
lib.resolve("getOpenFileNames");
|
||||
if( qtkde_getOpenFileNames == NULL )
|
||||
return;
|
||||
qtkde_getSaveFileName = (
|
||||
QString (*)( const QString& initialSelection, const QString& filter, QString* workingDirectory,
|
||||
long parent, const QCString& name, const QString& caption, QString* selectedFilter )
|
||||
)
|
||||
lib.resolve("getSaveFileName");
|
||||
if( qtkde_getSaveFileName == NULL )
|
||||
return;
|
||||
qtkde_getExistingDirectory = (
|
||||
QString (*)( const QString& initialDirectory, long parent, const QCString& name,
|
||||
const QString& caption )
|
||||
)
|
||||
lib.resolve("getExistingDirectory");
|
||||
if( qtkde_getExistingDirectory == NULL )
|
||||
return;
|
||||
qtkde_getColor = (
|
||||
QColor (*)( const QColor& color, long parent, const QCString& name )
|
||||
)
|
||||
lib.resolve("getColor");
|
||||
if( qtkde_getColor == NULL )
|
||||
return;
|
||||
qtkde_getFont = (
|
||||
QFont (*)( bool* ok, const QFont& def, long parent, const QCString& name )
|
||||
)
|
||||
lib.resolve("getFont");
|
||||
if( qtkde_getFont == NULL )
|
||||
return;
|
||||
qtkde_messageBox1 = (
|
||||
int (*)( int type, long parent, const QString& caption, const QString& text,
|
||||
int button0, int button1, int button2 )
|
||||
)
|
||||
lib.resolve("messageBox1");
|
||||
if( qtkde_messageBox1 == NULL )
|
||||
return;
|
||||
qtkde_messageBox2 = (
|
||||
int (*)( int type, long parent, const QString& caption, const QString& text,
|
||||
const QString& button0Text, const QString& button1Text, const QString& button2Text,
|
||||
int defaultButton, int escapeButton )
|
||||
)
|
||||
lib.resolve("messageBox2");
|
||||
if( qtkde_messageBox2 == NULL )
|
||||
return;
|
||||
enable = qtkde_initializeIntegration();
|
||||
}
|
||||
}
|
||||
|
||||
bool QKDEIntegration::initializeIntegration( )
|
||||
{
|
||||
return qtkde_initializeIntegration(
|
||||
);
|
||||
}
|
||||
QStringList QKDEIntegration::getOpenFileNames( const QString& filter, QString* workingDirectory,
|
||||
QWidget* parent, const char* name, const QString& caption, QString* selectedFilter,
|
||||
bool multiple )
|
||||
{
|
||||
return qtkde_getOpenFileNames(
|
||||
filter, workingDirectory, widgetToWinId( parent ), name, caption, selectedFilter, multiple );
|
||||
}
|
||||
QString QKDEIntegration::getSaveFileName( const QString& initialSelection, const QString& filter,
|
||||
QString* workingDirectory, QWidget* parent, const char* name, const QString& caption,
|
||||
QString* selectedFilter )
|
||||
{
|
||||
return qtkde_getSaveFileName(
|
||||
initialSelection, filter, workingDirectory, widgetToWinId( parent ), name, caption, selectedFilter );
|
||||
}
|
||||
QString QKDEIntegration::getExistingDirectory( const QString& initialDirectory, QWidget* parent,
|
||||
const char* name, const QString& caption )
|
||||
{
|
||||
return qtkde_getExistingDirectory(
|
||||
initialDirectory, widgetToWinId( parent ), name, caption );
|
||||
}
|
||||
QColor QKDEIntegration::getColor( const QColor& color, QWidget* parent, const char* name )
|
||||
{
|
||||
return qtkde_getColor(
|
||||
color, widgetToWinId( parent ), name );
|
||||
}
|
||||
QFont QKDEIntegration::getFont( bool* ok, const QFont* def, QWidget* parent, const char* name )
|
||||
{
|
||||
return qtkde_getFont(
|
||||
ok, fontPtrToFontRef( def ), widgetToWinId( parent ), name );
|
||||
}
|
||||
int QKDEIntegration::messageBox1( int type, QWidget* parent, const QString& caption,
|
||||
const QString& text, int button0, int button1, int button2 )
|
||||
{
|
||||
return qtkde_messageBox1(
|
||||
type, widgetToWinId( parent ), caption, text, button0, button1, button2 );
|
||||
}
|
||||
int QKDEIntegration::messageBox2( int type, QWidget* parent, const QString& caption,
|
||||
const QString& text, const QString& button0Text, const QString& button1Text, const QString& button2Text,
|
||||
int defaultButton, int escapeButton )
|
||||
{
|
||||
return qtkde_messageBox2(
|
||||
type, widgetToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton );
|
||||
}
|
||||
// ---
|
||||
|
||||
int QKDEIntegration::information( QWidget* parent, const QString& caption,
|
||||
const QString& text, int button0, int button1, int button2 )
|
||||
{
|
||||
return qtkde_messageBox1(
|
||||
QMessageBox::Information, widgetToWinId( parent ), caption, text, button0, button1, button2 );
|
||||
}
|
||||
|
||||
int QKDEIntegration::question( QWidget* parent, const QString& caption,
|
||||
const QString& text, int button0, int button1, int button2 )
|
||||
{
|
||||
return qtkde_messageBox1(
|
||||
QMessageBox::Question, widgetToWinId( parent ), caption, text, button0, button1, button2 );
|
||||
}
|
||||
|
||||
int QKDEIntegration::warning( QWidget* parent, const QString& caption,
|
||||
const QString& text, int button0, int button1, int button2 )
|
||||
{
|
||||
return qtkde_messageBox1(
|
||||
QMessageBox::Warning, widgetToWinId( parent ), caption, text, button0, button1, button2 );
|
||||
}
|
||||
|
||||
int QKDEIntegration::critical( QWidget* parent, const QString& caption,
|
||||
const QString& text, int button0, int button1, int button2 )
|
||||
{
|
||||
return qtkde_messageBox1(
|
||||
QMessageBox::Critical, widgetToWinId( parent ), caption, text, button0, button1, button2 );
|
||||
}
|
||||
|
||||
int QKDEIntegration::information( QWidget* parent, const QString& caption,
|
||||
const QString& text, const QString& button0Text, const QString& button1Text, const QString& button2Text,
|
||||
int defaultButton, int escapeButton )
|
||||
{
|
||||
return qtkde_messageBox2(
|
||||
QMessageBox::Information, widgetToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton );
|
||||
}
|
||||
|
||||
int QKDEIntegration::question( QWidget* parent, const QString& caption,
|
||||
const QString& text, const QString& button0Text, const QString& button1Text, const QString& button2Text,
|
||||
int defaultButton, int escapeButton )
|
||||
{
|
||||
return qtkde_messageBox2(
|
||||
QMessageBox::Question, widgetToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton );
|
||||
}
|
||||
|
||||
int QKDEIntegration::warning( QWidget* parent, const QString& caption,
|
||||
const QString& text, const QString& button0Text, const QString& button1Text, const QString& button2Text,
|
||||
int defaultButton, int escapeButton )
|
||||
{
|
||||
return qtkde_messageBox2(
|
||||
QMessageBox::Warning, widgetToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton );
|
||||
}
|
||||
|
||||
int QKDEIntegration::critical( QWidget* parent, const QString& caption,
|
||||
const QString& text, const QString& button0Text, const QString& button1Text, const QString& button2Text,
|
||||
int defaultButton, int escapeButton )
|
||||
{
|
||||
return qtkde_messageBox2(
|
||||
QMessageBox::Critical, widgetToWinId( parent ), caption, text, button0Text, button1Text, button2Text, defaultButton, escapeButton );
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
#ifndef QKDEINTEGRATION_H
|
||||
#define QKDEINTEGRATION_H
|
||||
|
||||
#include <qstringlist.h>
|
||||
|
||||
class QLibrary;
|
||||
class QWidget;
|
||||
class QColor;
|
||||
class QFont;
|
||||
|
||||
class QKDEIntegration
|
||||
{
|
||||
public:
|
||||
static bool enabled();
|
||||
// ---
|
||||
static bool initializeIntegration( );
|
||||
static QStringList getOpenFileNames( const QString& filter, QString* workingDirectory,
|
||||
QWidget* parent, const char* name, const QString& caption, QString* selectedFilter,
|
||||
bool multiple );
|
||||
static QString getSaveFileName( const QString& initialSelection, const QString& filter,
|
||||
QString* workingDirectory, QWidget* parent, const char* name, const QString& caption,
|
||||
QString* selectedFilter );
|
||||
static QString getExistingDirectory( const QString& initialDirectory, QWidget* parent,
|
||||
const char* name, const QString& caption );
|
||||
static QColor getColor( const QColor& color, QWidget* parent, const char* name );
|
||||
static QFont getFont( bool* ok, const QFont* def, QWidget* parent, const char* name );
|
||||
static int messageBox1( int type, QWidget* parent, const QString& caption,
|
||||
const QString& text, int button0, int button1, int button2 );
|
||||
static int information( QWidget* parent, const QString& caption, const QString& text,
|
||||
int button0, int button1, int button2 );
|
||||
static int question( QWidget* parent, const QString& caption, const QString& text,
|
||||
int button0, int button1, int button2 );
|
||||
static int warning( QWidget* parent, const QString& caption, const QString& text,
|
||||
int button0, int button1, int button2 );
|
||||
static int critical( QWidget* parent, const QString& caption, const QString& text,
|
||||
int button0, int button1, int button2 );
|
||||
static int messageBox2( int type, QWidget* parent, const QString& caption,
|
||||
const QString& text, const QString& button0Text, const QString& button1Text,
|
||||
const QString& button2Text, int defaultButton, int escapeButton );
|
||||
static int information( QWidget* parent, const QString& caption, const QString& text,
|
||||
const QString& button0Text, const QString& button1Text, const QString& button2Text,
|
||||
int defaultButton, int escapeButton );
|
||||
static int question( QWidget* parent, const QString& caption, const QString& text,
|
||||
const QString& button0Text, const QString& button1Text, const QString& button2Text,
|
||||
int defaultButton, int escapeButton );
|
||||
static int warning( QWidget* parent, const QString& caption, const QString& text,
|
||||
const QString& button0Text, const QString& button1Text, const QString& button2Text,
|
||||
int defaultButton, int escapeButton );
|
||||
static int critical( QWidget* parent, const QString& caption, const QString& text,
|
||||
const QString& button0Text, const QString& button1Text, const QString& button2Text,
|
||||
int defaultButton, int escapeButton );
|
||||
// ---
|
||||
private:
|
||||
static void initLibrary();
|
||||
static bool inited;
|
||||
static bool enable;
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,28 @@
|
||||
[General]
|
||||
font=Sans Serif,10,-1,5,50,0,0,0,0,0
|
||||
style=plastik
|
||||
enableXft=true
|
||||
useXft=true
|
||||
XIMInputStyle=On The Spot
|
||||
resolveSymlinks=false
|
||||
useRtlExtensions=true
|
||||
|
||||
[3.3]
|
||||
libraryPath=/opt/kde3/lib64/kde3/plugins/:/opt/kde3/lib/kde3/plugins
|
||||
|
||||
[KWinPalette]
|
||||
activeBackground=#3067a1
|
||||
activeBlend=#2fb1dd
|
||||
activeForeground=#ffffff
|
||||
activeTitleBtnBg=#dcdcdc
|
||||
frame=#eeeaee
|
||||
inactiveBackground=#6e6e6e
|
||||
inactiveBlend=#949494
|
||||
inactiveForeground=#ffffff
|
||||
inactiveFrame=#eeeaee
|
||||
inactiveTitleBtnBg=#494949
|
||||
|
||||
[Palette]
|
||||
active=#000000^e#f4f4f4^e#ffffff^e#ffffff^e#555555^e#c6c6c6^e#000000^e#ffffff^e#000000^e#ffffff^e#eeeaee^e#000000^e#447bcd^e#ffffff^e#535378^e#004000^e
|
||||
disabled=#808080^e#f4f4f4^e#ffffff^e#ffffff^e#555555^e#c6c3c6^e#c6c3c6^e#ffffff^e#808080^e#ffffff^e#eeeaee^e#000000^e#000080^e#ffffff^e#535378^e#004000^e
|
||||
inactive=#000000^e#f4f4f4^e#ffffff^e#ffffff^e#555555^e#c6c3c6^e#000000^e#ffffff^e#000000^e#ffffff^e#eeeaee^e#000000^e#447bcd^e#ffffff^e#535378^e#004000^e
|
@ -0,0 +1,47 @@
|
||||
--- src/tools/qsettings.cpp
|
||||
+++ src/tools/qsettings.cpp
|
||||
@@ -36,6 +36,7 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "qplatformdefs.h"
|
||||
+#include <stdlib.h>
|
||||
|
||||
// POSIX Large File Support redefines open -> open64
|
||||
static inline int qt_open( const char *pathname, int flags, mode_t mode )
|
||||
@@ -465,8 +466,18 @@
|
||||
Q_UNUSED( format );
|
||||
#endif
|
||||
|
||||
- QString appSettings(QDir::homeDirPath() + "/.qt/");
|
||||
- QString defPath;
|
||||
+ QString home;
|
||||
+ home = getenv("QT_HOME_DIR");
|
||||
+ if ( !home.isEmpty() ){
|
||||
+ home += "/";
|
||||
+ QFileInfo i( home + "qtrc" );
|
||||
+ if ( !i.isReadable() )
|
||||
+ home = QDir::homeDirPath() + "/.qt/";
|
||||
+ }else
|
||||
+ home = QDir::homeDirPath() + "/.qt/";
|
||||
+ QString appSettings(home);
|
||||
+
|
||||
+ QString defPath("/etc/X11/");
|
||||
#ifdef Q_WS_WIN
|
||||
#ifdef Q_OS_TEMP
|
||||
TCHAR path[MAX_PATH];
|
||||
@@ -514,6 +525,15 @@
|
||||
|
||||
if ( !!defPath )
|
||||
searchPaths.append(defPath);
|
||||
+
|
||||
+ QString system;
|
||||
+ system = getenv("QT_SYSTEM_DIR");
|
||||
+ if ( !system.isEmpty() && system[0] == '/') {
|
||||
+ QFileInfo i( system + "/qtrc" );
|
||||
+ if ( i.isReadable() )
|
||||
+ searchPaths.append(system);
|
||||
+ }
|
||||
+
|
||||
searchPaths.append(dir.path());
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
|
||||
according to bug 345459, this fix for stacking letters from 3.3.8
|
||||
made it only a lot worse. revert.
|
||||
|
||||
|
||||
--- src/kernel/qfontengine_x11.cpp
|
||||
+++ src/kernel/qfontengine_x11.cpp
|
||||
@@ -2672,23 +2655,16 @@ bool QOpenType::positionAndAdd(QShaperIt
|
||||
// ###### fix the case where we have y advances. How do we handle this in Uniscribe?????
|
||||
if (positions[i].new_advance) {
|
||||
item->advances[i] = item->flags & QTextEngine::RightToLeft
|
||||
- ? -qRound((positions[i].x_advance >> 6)*scale)
|
||||
+ ? -qRound((positions[i].x_advance >> 6)*scale)
|
||||
: qRound((positions[i].x_advance >> 6)*scale);
|
||||
} else {
|
||||
item->advances[i] += item->flags & QTextEngine::RightToLeft
|
||||
- ? -qRound((positions[i].x_advance >> 6)*scale)
|
||||
+ ? -qRound((positions[i].x_advance >> 6)*scale)
|
||||
: qRound((positions[i].x_advance >> 6)*scale);
|
||||
}
|
||||
- int back = 0;
|
||||
- item->offsets[i].x = qRound((positions[i].x_pos >> 6)*scale);
|
||||
- item->offsets[i].y = qRound((positions[i].y_pos >> 6)*scale);
|
||||
- while (positions[i-back].back) {
|
||||
- back += positions[i - back].back;
|
||||
- item->offsets[i].x += qRound((positions[i - back].x_pos >> 6)*scale);
|
||||
- item->offsets[i].y += qRound((positions[i - back].y_pos >> 6)*scale);
|
||||
- }
|
||||
- item->offsets[i].y = -item->offsets[i].y;
|
||||
- back = positions[i].back;
|
||||
+ item->offsets[i].x = qRound((positions[i].x_pos >> 6)*scale);
|
||||
+ item->offsets[i].y = -qRound((positions[i].y_pos >> 6)*scale);
|
||||
+ int back = positions[i].back;
|
||||
if (item->flags & QTextEngine::RightToLeft) {
|
||||
while (back--) {
|
||||
item->offsets[i].x -= item->advances[i-back];
|
@ -0,0 +1,339 @@
|
||||
--- src/iconview/qiconview.cpp
|
||||
+++ src/iconview/qiconview.cpp
|
||||
@@ -261,6 +261,7 @@
|
||||
|
||||
QIconViewToolTip *toolTip;
|
||||
QPixmapCache maskCache;
|
||||
+ QPixmap *backrubber;
|
||||
QPtrDict<QIconViewItem> selectedItems;
|
||||
|
||||
struct ItemContainer {
|
||||
@@ -1975,14 +1976,27 @@
|
||||
if ( picture() ) {
|
||||
QPicture *pic = picture();
|
||||
if ( isSelected() ) {
|
||||
- p->fillRect( pixmapRect( FALSE ), QBrush( cg.highlight(), QBrush::Dense4Pattern) );
|
||||
+ p->setBrush( QBrush( cg.highlight(), QBrush::Dense4Pattern ) );
|
||||
+ p->setPen( QPen( cg.highlight(), QBrush::Dense4Pattern ) );
|
||||
+ p->drawRoundRect( pixmapRect( FALSE ),
|
||||
+ 1000 / pixmapRect( FALSE ).width(),
|
||||
+ 1000 / pixmapRect( FALSE ).height() );
|
||||
}
|
||||
p->drawPicture( x()-pic->boundingRect().x(), y()-pic->boundingRect().y(), *pic );
|
||||
if ( isSelected() ) {
|
||||
- p->fillRect( textRect( FALSE ), cg.highlight() );
|
||||
+ p->setBrush( QBrush( cg.highlight() ) );
|
||||
+ p->setPen( QPen( cg.highlight() ) );
|
||||
+ p->drawRoundRect( textRect( FALSE ),
|
||||
+ 1000 / textRect( FALSE ).width(),
|
||||
+ 1000 / textRect( FALSE ).height() );
|
||||
p->setPen( QPen( cg.highlightedText() ) );
|
||||
- } else if ( view->d->itemTextBrush != NoBrush )
|
||||
- p->fillRect( textRect( FALSE ), view->d->itemTextBrush );
|
||||
+ } else if ( view->d->itemTextBrush != NoBrush ) {
|
||||
+ p->setBrush( view->d->itemTextBrush );
|
||||
+ p->setPen( QPen( view->d->itemTextBrush.color() ) );
|
||||
+ p->drawRoundRect( textRect( FALSE ),
|
||||
+ 1000 / textRect( FALSE ).width(),
|
||||
+ 1000 / textRect( FALSE ).height() );
|
||||
+ }
|
||||
|
||||
int align = view->itemTextPos() == QIconView::Bottom ? AlignHCenter : AlignAuto;
|
||||
if ( view->d->wordWrapIconText )
|
||||
@@ -2040,10 +2054,19 @@
|
||||
|
||||
p->save();
|
||||
if ( isSelected() ) {
|
||||
- p->fillRect( textRect( FALSE ), cg.highlight() );
|
||||
+ p->setBrush( QBrush( cg.highlight() ) );
|
||||
+ p->setPen( QPen( cg.highlight() ) );
|
||||
+ p->drawRoundRect( textRect( FALSE ),
|
||||
+ 1000 / textRect( FALSE ).width(),
|
||||
+ 1000 / textRect( FALSE ).height() );
|
||||
p->setPen( QPen( cg.highlightedText() ) );
|
||||
- } else if ( view->d->itemTextBrush != NoBrush )
|
||||
- p->fillRect( textRect( FALSE ), view->d->itemTextBrush );
|
||||
+ } else if ( view->d->itemTextBrush != NoBrush ) {
|
||||
+ p->setBrush( view->d->itemTextBrush );
|
||||
+ p->setPen( QPen( view->d->itemTextBrush.color() ) );
|
||||
+ p->drawRoundRect( textRect( FALSE ),
|
||||
+ 1000 / textRect( FALSE ).width(),
|
||||
+ 1000 / textRect( FALSE ).height() );
|
||||
+ }
|
||||
|
||||
int align = AlignHCenter;
|
||||
if ( view->d->wordWrapIconText )
|
||||
@@ -2059,31 +2082,13 @@
|
||||
/*!
|
||||
Paints the focus rectangle of the item using the painter \a p and
|
||||
the color group \a cg.
|
||||
+
|
||||
+ The default implementation does nothing; subclasses may
|
||||
+ reimplement this function.
|
||||
*/
|
||||
|
||||
-void QIconViewItem::paintFocus( QPainter *p, const QColorGroup &cg )
|
||||
+void QIconViewItem::paintFocus( QPainter *, const QColorGroup & )
|
||||
{
|
||||
- if ( !view )
|
||||
- return;
|
||||
-
|
||||
- view->style().drawPrimitive(QStyle::PE_FocusRect, p,
|
||||
- QRect( textRect( FALSE ).x(), textRect( FALSE ).y(),
|
||||
- textRect( FALSE ).width(),
|
||||
- textRect( FALSE ).height() ), cg,
|
||||
- (isSelected() ?
|
||||
- QStyle::Style_FocusAtBorder :
|
||||
- QStyle::Style_Default),
|
||||
- QStyleOption(isSelected() ? cg.highlight() : cg.base()));
|
||||
-
|
||||
- if ( this != view->d->currentItem ) {
|
||||
- view->style().drawPrimitive(QStyle::PE_FocusRect, p,
|
||||
- QRect( pixmapRect( FALSE ).x(),
|
||||
- pixmapRect( FALSE ).y(),
|
||||
- pixmapRect( FALSE ).width(),
|
||||
- pixmapRect( FALSE ).height() ),
|
||||
- cg, QStyle::Style_Default,
|
||||
- QStyleOption(cg.base()));
|
||||
- }
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -2781,6 +2786,7 @@
|
||||
d->renamingItem = 0;
|
||||
d->drawActiveSelection = TRUE;
|
||||
d->drawDragShapes = FALSE;
|
||||
+ d->backrubber = 0;
|
||||
|
||||
connect( d->adjustTimer, SIGNAL( timeout() ),
|
||||
this, SLOT( adjustItems() ) );
|
||||
@@ -3265,7 +3271,7 @@
|
||||
|
||||
void QIconView::doAutoScroll()
|
||||
{
|
||||
- QRect oldRubber = QRect( *d->rubber );
|
||||
+ QRect oldRubber = *d->rubber;
|
||||
|
||||
QPoint vp = viewport()->mapFromGlobal( QCursor::pos() );
|
||||
QPoint pos = viewportToContents( vp );
|
||||
@@ -3282,7 +3288,6 @@
|
||||
bool block = signalsBlocked();
|
||||
|
||||
QRect rr;
|
||||
- QRegion region( 0, 0, visibleWidth(), visibleHeight() );
|
||||
|
||||
blockSignals( TRUE );
|
||||
viewport()->setUpdatesEnabled( FALSE );
|
||||
@@ -3308,9 +3313,6 @@
|
||||
item->setSelected( TRUE, TRUE );
|
||||
changed = TRUE;
|
||||
rr = rr.unite( item->rect() );
|
||||
- } else {
|
||||
- region = region.subtract( QRect( contentsToViewport( item->pos() ),
|
||||
- item->size() ) );
|
||||
}
|
||||
|
||||
minx = QMIN( minx, item->x() - 1 );
|
||||
@@ -3327,42 +3329,77 @@
|
||||
viewport()->setUpdatesEnabled( TRUE );
|
||||
blockSignals( block );
|
||||
|
||||
- QRect r = *d->rubber;
|
||||
- *d->rubber = oldRubber;
|
||||
-
|
||||
- QPainter p;
|
||||
- p.begin( viewport() );
|
||||
- p.setRasterOp( NotROP );
|
||||
- p.setPen( QPen( color0, 1 ) );
|
||||
- p.setBrush( NoBrush );
|
||||
- drawRubber( &p );
|
||||
- d->dragging = FALSE;
|
||||
- p.end();
|
||||
-
|
||||
- *d->rubber = r;
|
||||
-
|
||||
- if ( changed ) {
|
||||
- d->drawAllBack = FALSE;
|
||||
- d->clipRegion = region;
|
||||
- repaintContents( rr, FALSE );
|
||||
- d->drawAllBack = TRUE;
|
||||
+ // static bool drawAll;
|
||||
+ if ( d->backrubber == 0 ) {
|
||||
+ d->backrubber = new QPixmap( viewport()->rect().size() );
|
||||
+ d->backrubber->fill( viewport(), viewport()->rect().topLeft() );
|
||||
+ // drawAll = true;
|
||||
}
|
||||
|
||||
+ // int oldX = 0, oldY = 0;
|
||||
+ // if ( !drawAll && d->scrollTimer ) {
|
||||
+ // oldX = contentsX();
|
||||
+ // oldY = contentsY();
|
||||
+ // }
|
||||
ensureVisible( pos.x(), pos.y() );
|
||||
+ // if ( !drawAll && d->scrollTimer && ( oldX != contentsX() || oldY != contentsY() ) )
|
||||
+ // drawAll = true;
|
||||
|
||||
- p.begin( viewport() );
|
||||
- p.setRasterOp( NotROP );
|
||||
- p.setPen( QPen( color0, 1 ) );
|
||||
- p.setBrush( NoBrush );
|
||||
- drawRubber( &p );
|
||||
- d->dragging = TRUE;
|
||||
+ QRect allRect = oldRubber.normalize();
|
||||
+ if ( changed )
|
||||
+ allRect |= rr.normalize();
|
||||
+ allRect |= d->rubber->normalize();
|
||||
+ QPoint point = contentsToViewport( allRect.topLeft() );
|
||||
+ allRect = QRect( point.x(), point.y(), allRect.width(), allRect.height() );
|
||||
+ allRect &= viewport()->rect();
|
||||
+
|
||||
+ d->dragging = FALSE;
|
||||
+
|
||||
+ QPainter p( d->backrubber );
|
||||
+ p.translate( -contentsX(), -contentsY() );
|
||||
+#if 0
|
||||
+ if ( !drawAll ) {
|
||||
+ oldRubber = oldRubber.normalize();
|
||||
+ point = contentsToViewport( oldRubber.topLeft() );
|
||||
+ oldRubber = QRect( point.x(), point.y(), oldRubber.width(), oldRubber.height() );
|
||||
+ oldRubber &= viewport()->rect();
|
||||
+
|
||||
+ point = contentsToViewport( nr.topLeft() );
|
||||
+ nr = QRect( point.x(), point.y(), nr.width(), nr.height() );
|
||||
+ nr &= viewport()->rect();
|
||||
+
|
||||
+ QRegion region;
|
||||
+ if ( allRect != nr )
|
||||
+ region = QRegion(allRect).subtract( QRegion( nr ) );
|
||||
+ if ( allRect != oldRubber )
|
||||
+ region += QRegion(allRect).subtract( QRegion( oldRubber ) );
|
||||
+
|
||||
+ QMemArray< QRect > ar = region.rects();
|
||||
+ for ( uint i = 0; i < ar.size(); ++i ) {
|
||||
+ ar[i].addCoords( -2, -2, 4, 4 );
|
||||
+ ar[i] = ar[i].normalize();
|
||||
+
|
||||
+ p.setClipRect( ar[i] );
|
||||
+ drawContents( &p, contentsX() + ar[i].left(), contentsY() + ar[i].top(), ar[i].width(), ar[i].height() );
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+#endif
|
||||
+ {
|
||||
+ drawContents( &p,
|
||||
+ contentsX() + allRect.left(), contentsY() + allRect.top(),
|
||||
+ allRect.width(), allRect.height() );
|
||||
+ }
|
||||
|
||||
p.end();
|
||||
+ // drawAll = false;
|
||||
+ d->dragging = TRUE;
|
||||
+ bitBlt( viewport(), allRect.topLeft(), d->backrubber, allRect );
|
||||
|
||||
if ( changed ) {
|
||||
emit selectionChanged();
|
||||
- if ( d->selectionMode == Single )
|
||||
- emit selectionChanged( d->currentItem );
|
||||
+ if ( d->selectionMode == Single )
|
||||
+ emit selectionChanged( d->currentItem );
|
||||
}
|
||||
|
||||
if ( !QRect( 50, 50, viewport()->width()-100, viewport()->height()-100 ).contains( vp ) &&
|
||||
@@ -3389,9 +3426,7 @@
|
||||
|
||||
void QIconView::drawContents( QPainter *p, int cx, int cy, int cw, int ch )
|
||||
{
|
||||
- if ( d->dragging && d->rubber )
|
||||
- drawRubber( p );
|
||||
-
|
||||
+ p->save();
|
||||
QRect r = QRect( cx, cy, cw, ch );
|
||||
|
||||
QIconViewPrivate::ItemContainer *c = d->firstContainer;
|
||||
@@ -3465,8 +3500,16 @@
|
||||
d->currentItem->paintFocus( p, colorGroup() );
|
||||
}
|
||||
|
||||
- if ( d->dragging && d->rubber )
|
||||
- drawRubber( p );
|
||||
+ p->restore();
|
||||
+ if ( d->rubber ) {
|
||||
+ p->save();
|
||||
+ p->translate( contentsX(), contentsY() );
|
||||
+ p->setRasterOp( NotROP );
|
||||
+ p->setPen( QPen( color0, 1 ) );
|
||||
+ p->setBrush( NoBrush );
|
||||
+ drawRubber( p );
|
||||
+ p->restore();
|
||||
+ }
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -4365,17 +4408,15 @@
|
||||
void QIconView::contentsMousePressEventEx( QMouseEvent *e )
|
||||
{
|
||||
if ( d->rubber ) {
|
||||
- QPainter p;
|
||||
- p.begin( viewport() );
|
||||
- p.setRasterOp( NotROP );
|
||||
- p.setPen( QPen( color0, 1 ) );
|
||||
- p.setBrush( NoBrush );
|
||||
+ QRect r( d->rubber->normalize() );
|
||||
+ delete d->rubber;
|
||||
+ d->rubber = 0;
|
||||
+
|
||||
+ repaintContents( r, FALSE );
|
||||
+ d->dragging = FALSE;
|
||||
|
||||
- drawRubber( &p );
|
||||
- d->dragging = FALSE;
|
||||
- p.end();
|
||||
- delete d->rubber;
|
||||
- d->rubber = 0;
|
||||
+ delete d->backrubber;
|
||||
+ d->backrubber = 0;
|
||||
|
||||
if ( d->scrollTimer ) {
|
||||
disconnect( d->scrollTimer, SIGNAL( timeout() ), this, SLOT( doAutoScroll() ) );
|
||||
@@ -4560,21 +4601,17 @@
|
||||
d->startDragItem = 0;
|
||||
|
||||
if ( d->rubber ) {
|
||||
- QPainter p;
|
||||
- p.begin( viewport() );
|
||||
- p.setRasterOp( NotROP );
|
||||
- p.setPen( QPen( color0, 1 ) );
|
||||
- p.setBrush( NoBrush );
|
||||
-
|
||||
- drawRubber( &p );
|
||||
- d->dragging = FALSE;
|
||||
- p.end();
|
||||
-
|
||||
+ QRect r(d->rubber->normalize());
|
||||
+
|
||||
if ( ( d->rubber->topLeft() - d->rubber->bottomRight() ).manhattanLength() >
|
||||
QApplication::startDragDistance() )
|
||||
emitClicked = FALSE;
|
||||
delete d->rubber;
|
||||
- d->rubber = 0;
|
||||
+ d->rubber = 0;
|
||||
+ repaintContents(r, FALSE);
|
||||
+ d->dragging = FALSE;
|
||||
+ delete d->backrubber;
|
||||
+ d->backrubber = 0;
|
||||
d->currentItem = d->tmpCurrentItem;
|
||||
d->tmpCurrentItem = 0;
|
||||
if ( d->currentItem )
|
||||
@@ -5334,9 +5371,9 @@
|
||||
QPoint pnt( d->rubber->x(), d->rubber->y() );
|
||||
pnt = contentsToViewport( pnt );
|
||||
|
||||
- style().drawPrimitive(QStyle::PE_RubberBand, p,
|
||||
- QRect(pnt.x(), pnt.y(), d->rubber->width(), d->rubber->height()),
|
||||
- colorGroup(), QStyle::Style_Default, QStyleOption(colorGroup().base()));
|
||||
+ style().drawPrimitive( QStyle::PE_RubberBand, p,
|
||||
+ QRect( pnt.x(), pnt.y(), d->rubber->width(), d->rubber->height() ).normalize(),
|
||||
+ colorGroup(), QStyle::Style_Default, QStyleOption(colorGroup().base()) );
|
||||
}
|
||||
|
||||
/*!
|
@ -0,0 +1,45 @@
|
||||
--- src/kernel/qpixmap_x11.cpp
|
||||
+++ src/kernel/qpixmap_x11.cpp
|
||||
@@ -288,8 +288,9 @@
|
||||
{
|
||||
#if defined(QT_CHECK_STATE)
|
||||
if ( qApp->type() == QApplication::Tty ) {
|
||||
- qWarning( "QPixmap: Cannot create a QPixmap when no GUI "
|
||||
- "is being used" );
|
||||
+// qWarning( "QPixmap: Cannot create a QPixmap when no GUI "
|
||||
+// "is being used" );
|
||||
+ ;
|
||||
}
|
||||
#endif
|
||||
|
||||
--- src/tools/qcomlibrary.cpp
|
||||
+++ src/tools/qcomlibrary.cpp
|
||||
@@ -102,25 +102,11 @@
|
||||
(const char*) QFile::encodeName(library) );
|
||||
} else if ( ( version > QT_VERSION ) ||
|
||||
( ( QT_VERSION & 0xff0000 ) > ( version & 0xff0000 ) ) ) {
|
||||
- if ( warn )
|
||||
- qWarning( "Conflict in %s:\n"
|
||||
- " Plugin uses incompatible Qt library (%d.%d.%d)!",
|
||||
- (const char*) QFile::encodeName(library),
|
||||
- (version&0xff0000) >> 16, (version&0xff00) >> 8, version&0xff );
|
||||
+ return FALSE;
|
||||
} else if ( (flags & 2) != (our_flags & 2) ) {
|
||||
- if ( warn )
|
||||
- qWarning( "Conflict in %s:\n"
|
||||
- " Plugin uses %s Qt library!",
|
||||
- (const char*) QFile::encodeName(library),
|
||||
- (flags & 2) ? "multi threaded" : "single threaded" );
|
||||
+ return FALSE;
|
||||
} else if ( key != QT_BUILD_KEY ) {
|
||||
- if ( warn )
|
||||
- qWarning( "Conflict in %s:\n"
|
||||
- " Plugin uses incompatible Qt library!\n"
|
||||
- " expected build key \"%s\", got \"%s\".",
|
||||
- (const char*) QFile::encodeName(library),
|
||||
- QT_BUILD_KEY,
|
||||
- key.isEmpty() ? "<null>" : (const char *) key );
|
||||
+ return FALSE;
|
||||
} else {
|
||||
return TRUE;
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
#! /usr/bin/perl
|
||||
|
||||
my $name = $ARGV[0];
|
||||
$name =~ s,.*/,,;
|
||||
$name =~ s,\.spec.*,,;
|
||||
|
||||
my %attributes = ();
|
||||
open(FILE, $ARGV[1]) || die 'no attributes';
|
||||
my $pack = undef;
|
||||
my $text = undef;
|
||||
while ( <FILE> ) {
|
||||
if (/^\+(.*)$/) { $pack = $1; $text = ''; next }
|
||||
if (/^-(.*)$/) {
|
||||
if ($pack ne $1) {
|
||||
die "$pack and $1 do not match";
|
||||
}
|
||||
$text =~ s,^\s*,,;
|
||||
$text =~ s,\s*$,,;
|
||||
$attributes{$pack} = $text;
|
||||
$text = undef;
|
||||
$pack = undef;
|
||||
next;
|
||||
}
|
||||
if (defined $text) {
|
||||
$text .= $_;
|
||||
} elsif (/^(\S*)\s*(.*)$/) {
|
||||
my $attr = $1;
|
||||
my $string = $2;
|
||||
$string =~ s,^\s*,,;
|
||||
$string =~ s,\s*$,,;
|
||||
$attributes{$attr} = $string;
|
||||
}
|
||||
}
|
||||
close(FILE);
|
||||
|
||||
open(FILE, $ARGV[0]);
|
||||
|
||||
sub description()
|
||||
{
|
||||
if (/^%description\s*(.*)\s*/) {
|
||||
my $suffix = $1;
|
||||
my $pname = $name;
|
||||
|
||||
if ($suffix =~ m/-n\s*(.*)/) {
|
||||
$pname = $1;
|
||||
} else {
|
||||
$pname = "$name-$suffix" if ($suffix);
|
||||
}
|
||||
|
||||
if (defined $attributes{"description.$pname"}) {
|
||||
print $_;
|
||||
my $descr = $attributes{"description.$pname"};
|
||||
print "$descr\n";
|
||||
$_ = '';
|
||||
do {
|
||||
$_ = <FILE>;
|
||||
} while ( $_ !~ /^%/ && $_ !~ /^@/ );
|
||||
print "\n";
|
||||
description();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# current subpackage
|
||||
my $pname = $name;
|
||||
|
||||
while ( <FILE> )
|
||||
{
|
||||
if (/^Name:\s*(.*)/) {
|
||||
$name = $1;
|
||||
$pname = $1;
|
||||
}
|
||||
description();
|
||||
|
||||
if (/^%package\s*(.*)/) {
|
||||
my $suffix = $1;
|
||||
if ($suffix =~ m/-n\s*(.*)/) {
|
||||
$pname = $1;
|
||||
} else {
|
||||
$pname = "$name-$1";
|
||||
}
|
||||
}
|
||||
|
||||
if (/^(Summary:\s*)(.*)$/) {
|
||||
if (defined $attributes{"summary.$pname"}) {
|
||||
print $1 . $attributes{"summary.$pname"} ."\n";
|
||||
next;
|
||||
}
|
||||
}
|
||||
if (/^(License:\s*)(.*)$/) {
|
||||
if (defined $attributes{"license.$pname"}) {
|
||||
print $1 . $attributes{"license.$pname"} ."\n";
|
||||
next;
|
||||
}
|
||||
}
|
||||
if (/^(Group:\s*)(.*)$/) {
|
||||
if (defined $attributes{"group.$pname"}) {
|
||||
print $1 . $attributes{"group.$pname"} ."\n";
|
||||
next;
|
||||
}
|
||||
}
|
||||
print $_;
|
||||
}
|
||||
|
||||
close(FILE);
|
@ -0,0 +1,106 @@
|
||||
qt-bugs@ issue :
|
||||
bugs.kde.org number :
|
||||
applied: no
|
||||
author: Dirk Mueller <mueller@kde.org>
|
||||
|
||||
support xrandr 1.2 configurations. same patch like for trunk qt-copy,
|
||||
please see there for details.
|
||||
|
||||
|
||||
--- src/kernel/qdesktopwidget_x11.cpp
|
||||
+++ src/kernel/qdesktopwidget_x11.cpp
|
||||
@@ -107,7 +107,7 @@ QDesktopWidgetPrivate::~QDesktopWidgetPr
|
||||
screens[i] = 0;
|
||||
}
|
||||
|
||||
- delete [] screens;
|
||||
+ free(screens);
|
||||
}
|
||||
|
||||
if ( rects ) delete [] rects;
|
||||
@@ -119,30 +119,33 @@ void QDesktopWidgetPrivate::init()
|
||||
// get the screen count
|
||||
#ifndef QT_NO_XINERAMA
|
||||
XineramaScreenInfo *xinerama_screeninfo = 0;
|
||||
- int unused;
|
||||
+ int unused, newScreenCount;
|
||||
use_xinerama = (XineramaQueryExtension(QPaintDevice::x11AppDisplay(),
|
||||
&unused, &unused) &&
|
||||
XineramaIsActive(QPaintDevice::x11AppDisplay()));
|
||||
|
||||
if (use_xinerama) {
|
||||
xinerama_screeninfo =
|
||||
- XineramaQueryScreens(QPaintDevice::x11AppDisplay(), &screenCount);
|
||||
+ XineramaQueryScreens(QPaintDevice::x11AppDisplay(), &newScreenCount);
|
||||
+
|
||||
+ if (xinerama_screeninfo)
|
||||
defaultScreen = 0;
|
||||
} else
|
||||
#endif // QT_NO_XINERAMA
|
||||
{
|
||||
defaultScreen = DefaultScreen(QPaintDevice::x11AppDisplay());
|
||||
- screenCount = ScreenCount(QPaintDevice::x11AppDisplay());
|
||||
+ newScreenCount = ScreenCount(QPaintDevice::x11AppDisplay());
|
||||
+ use_xinerama = false;
|
||||
}
|
||||
|
||||
delete [] rects;
|
||||
- rects = new QRect[ screenCount ];
|
||||
+ rects = new QRect[ newScreenCount ];
|
||||
delete [] workareas;
|
||||
- workareas = new QRect[ screenCount ];
|
||||
+ workareas = new QRect[ newScreenCount ];
|
||||
|
||||
// get the geometry of each screen
|
||||
- int i, x, y, w, h;
|
||||
- for ( i = 0; i < screenCount; i++ ) {
|
||||
+ int i, j, x, y, w, h;
|
||||
+ for ( i = 0, j = 0; i < newScreenCount; i++ ) {
|
||||
|
||||
#ifndef QT_NO_XINERAMA
|
||||
if (use_xinerama) {
|
||||
@@ -159,11 +162,33 @@ void QDesktopWidgetPrivate::init()
|
||||
h = HeightOfScreen(ScreenOfDisplay(QPaintDevice::x11AppDisplay(), i));
|
||||
}
|
||||
|
||||
- rects[i].setRect(x, y, w, h);
|
||||
workareas[i] = QRect();
|
||||
+ rects[j].setRect(x, y, w, h);
|
||||
+
|
||||
+ // overlapping?
|
||||
+ if (j > 0 && rects[j-1].intersects(rects[j])) {
|
||||
+ // pick the bigger one, ignore the other
|
||||
+ if ((rects[j].width()*rects[j].height()) >
|
||||
+ (rects[j-1].width()*rects[j-1].height()))
|
||||
+ rects[j-1] = rects[j];
|
||||
+ }
|
||||
+ else
|
||||
+ j++;
|
||||
}
|
||||
|
||||
+ if (screens) {
|
||||
+ // leaks QWidget* pointers on purpose, can't delete them as pointer escapes
|
||||
+ screens = (QWidget**) realloc(screens, j * sizeof(QWidget*));
|
||||
+ if (j > screenCount)
|
||||
+ memset(&screens[screenCount], 0, (j-screenCount) * sizeof(QWidget*));
|
||||
+ }
|
||||
+
|
||||
+ screenCount = j;
|
||||
+
|
||||
#ifndef QT_NO_XINERAMA
|
||||
+ if (use_xinerama && screenCount == 1)
|
||||
+ use_xinerama = false;
|
||||
+
|
||||
if (xinerama_screeninfo)
|
||||
XFree(xinerama_screeninfo);
|
||||
#endif // QT_NO_XINERAMA
|
||||
@@ -216,8 +241,7 @@ QWidget *QDesktopWidget::screen( int scr
|
||||
screen = d->defaultScreen;
|
||||
|
||||
if ( ! d->screens ) {
|
||||
- d->screens = new QWidget*[ d->screenCount ];
|
||||
- memset( d->screens, 0, d->screenCount * sizeof( QWidget * ) );
|
||||
+ d->screens = (QWidget**) calloc( d->screenCount, sizeof(QWidget*));
|
||||
d->screens[ d->defaultScreen ] = this;
|
||||
}
|
||||
|
@ -0,0 +1,104 @@
|
||||
--- src/widgets/qpopupmenu.cpp.sav
|
||||
+++ src/widgets/qpopupmenu.cpp
|
||||
@@ -457,6 +457,15 @@
|
||||
menuContentsChanged();
|
||||
}
|
||||
|
||||
+QRect QPopupMenu::screenRect( const QPoint& pos )
|
||||
+{
|
||||
+ int screen_num = QApplication::desktop()->screenNumber( pos );
|
||||
+#ifdef Q_WS_MAC
|
||||
+ return QApplication::desktop()->availableGeometry( screen_num );
|
||||
+#else
|
||||
+ return QApplication::desktop()->screenGeometry( screen_num );
|
||||
+#endif
|
||||
+}
|
||||
/*!
|
||||
Displays the popup menu so that the item number \a indexAtPoint
|
||||
will be at the specified \e global position \a pos. To translate a
|
||||
@@ -501,6 +510,15 @@
|
||||
// point.
|
||||
#endif
|
||||
|
||||
+ QRect screen = screenRect( geometry().center());
|
||||
+ QRect screen2 = screenRect( QApplication::reverseLayout()
|
||||
+ ? pos+QPoint(width(),0) : pos );
|
||||
+ // if the widget is not in the screen given by the position, move it
|
||||
+ // there, so that updateSize() uses the right size of the screen
|
||||
+ if( screen != screen2 ) {
|
||||
+ screen = screen2;
|
||||
+ move( screen.x(), screen.y());
|
||||
+ }
|
||||
if(d->scroll.scrollable) {
|
||||
d->scroll.scrollable = QPopupMenuPrivate::Scroll::ScrollNone;
|
||||
d->scroll.topScrollableIndex = d->scroll.scrollableSize = 0;
|
||||
@@ -520,18 +538,6 @@
|
||||
updateSize(TRUE);
|
||||
}
|
||||
|
||||
- int screen_num;
|
||||
- if (QApplication::desktop()->isVirtualDesktop())
|
||||
- screen_num =
|
||||
- QApplication::desktop()->screenNumber( QApplication::reverseLayout() ?
|
||||
- pos+QPoint(width(),0) : pos );
|
||||
- else
|
||||
- screen_num = QApplication::desktop()->screenNumber( this );
|
||||
-#ifdef Q_WS_MAC
|
||||
- QRect screen = QApplication::desktop()->availableGeometry( screen_num );
|
||||
-#else
|
||||
- QRect screen = QApplication::desktop()->screenGeometry( screen_num );
|
||||
-#endif
|
||||
int sw = screen.width(); // screen width
|
||||
int sh = screen.height(); // screen height
|
||||
int sx = screen.x(); // screen pos
|
||||
@@ -1059,7 +1065,7 @@
|
||||
mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4 );
|
||||
}
|
||||
|
||||
- int dh = QApplication::desktop()->height();
|
||||
+ int dh = screenRect( geometry().center()).height();
|
||||
ncols = 1;
|
||||
|
||||
for ( QMenuItemListIt it2( *mitems ); it2.current(); ++it2 ) {
|
||||
@@ -2313,9 +2319,9 @@
|
||||
bool right = FALSE;
|
||||
if ( ( parentMenu && parentMenu->isPopupMenu &&
|
||||
((QPopupMenu*)parentMenu)->geometry().x() < geometry().x() ) ||
|
||||
- p.x() < 0 )
|
||||
+ p.x() < screenRect( p ).left())
|
||||
right = TRUE;
|
||||
- if ( right && (ps.width() > QApplication::desktop()->width() - mapToGlobal( r.topRight() ).x() ) )
|
||||
+ if ( right && (ps.width() > screenRect( p ).right() - mapToGlobal( r.topRight() ).x() ) )
|
||||
right = FALSE;
|
||||
if ( right )
|
||||
p.setX( mapToGlobal( r.topRight() ).x() );
|
||||
@@ -2326,7 +2332,7 @@
|
||||
bool left = FALSE;
|
||||
if ( ( parentMenu && parentMenu->isPopupMenu &&
|
||||
((QPopupMenu*)parentMenu)->geometry().x() > geometry().x() ) ||
|
||||
- p.x() + ps.width() > QApplication::desktop()->width() )
|
||||
+ p.x() + ps.width() > screenRect( p ).right() )
|
||||
left = TRUE;
|
||||
if ( left && (ps.width() > mapToGlobal( r.topLeft() ).x() ) )
|
||||
left = FALSE;
|
||||
@@ -2334,8 +2340,8 @@
|
||||
p.setX( mapToGlobal( r.topLeft() ).x() - ps.width() );
|
||||
}
|
||||
QRect pr = popup->itemGeometry(popup->count() - 1);
|
||||
- if (p.y() + ps.height() > QApplication::desktop()->height() &&
|
||||
- p.y() - ps.height() + (QCOORD) pr.height() >= 0)
|
||||
+ if (p.y() + ps.height() > screenRect( p ).bottom() &&
|
||||
+ p.y() - ps.height() + (QCOORD) pr.height() >= screenRect( p ).top())
|
||||
p.setY( p.y() - ps.height() + (QCOORD) pr.height());
|
||||
|
||||
if ( style().styleHint(QStyle::SH_PopupMenu_SloppySubMenus, this )) {
|
||||
--- src/widgets/qpopupmenu.h.sav
|
||||
+++ src/widgets/qpopupmenu.h
|
||||
@@ -152,6 +152,7 @@
|
||||
|
||||
QSize updateSize(bool force_recalc=FALSE, bool do_resize=TRUE);
|
||||
void updateRow( int row );
|
||||
+ QRect screenRect(const QPoint& pos);
|
||||
#ifndef QT_NO_ACCEL
|
||||
void updateAccel( QWidget * );
|
||||
void enableAccel( bool );
|
@ -0,0 +1,49 @@
|
||||
--- src/dialogs/qdialog.cpp
|
||||
+++ src/dialogs/qdialog.cpp
|
||||
@@ -670,6 +670,11 @@
|
||||
|
||||
#if defined(Q_WS_X11)
|
||||
extern "C" { int XSetTransientForHint( Display *, unsigned long, unsigned long ); }
|
||||
+#include <private/qt_x11_p.h>
|
||||
+#undef FocusIn
|
||||
+// defined in qapplication_x11.cpp
|
||||
+extern Atom qt_net_wm_full_placement;
|
||||
+extern bool qt_net_supports(Atom atom);
|
||||
#endif // Q_WS_X11
|
||||
|
||||
/*!
|
||||
@@ -691,10 +696,12 @@
|
||||
|
||||
if ( !did_resize )
|
||||
adjustSize();
|
||||
- if ( has_relpos && !did_move ) {
|
||||
- adjustPositionInternal( parentWidget(), TRUE );
|
||||
- } else if ( !did_move ) {
|
||||
- adjustPositionInternal( parentWidget() );
|
||||
+ if( !qt_net_supports( qt_net_wm_full_placement )) {
|
||||
+ if ( has_relpos && !did_move ) {
|
||||
+ adjustPositionInternal( parentWidget(), TRUE );
|
||||
+ } else if ( !did_move ) {
|
||||
+ adjustPositionInternal( parentWidget() );
|
||||
+ }
|
||||
}
|
||||
|
||||
if (windowState() != state)
|
||||
--- src/kernel/qapplication_x11.cpp
|
||||
+++ src/kernel/qapplication_x11.cpp
|
||||
@@ -273,6 +273,7 @@
|
||||
Atom qt_net_wm_state_stays_on_top = 0; // KDE extension
|
||||
Atom qt_net_wm_pid = 0;
|
||||
Atom qt_net_wm_user_time = 0;
|
||||
+Atom qt_net_wm_full_placement = 0; // KDE extension
|
||||
// Enlightenment support
|
||||
Atom qt_enlightenment_desktop = 0;
|
||||
|
||||
@@ -1989,6 +1990,7 @@
|
||||
&qt_net_wm_state_stays_on_top );
|
||||
qt_x11_intern_atom( "_NET_WM_PID", &qt_net_wm_pid );
|
||||
qt_x11_intern_atom( "_NET_WM_USER_TIME", &qt_net_wm_user_time );
|
||||
+ qt_x11_intern_atom( "_NET_WM_FULL_PLACEMENT", &qt_net_wm_full_placement );
|
||||
qt_x11_intern_atom( "ENLIGHTENMENT_DESKTOP", &qt_enlightenment_desktop );
|
||||
qt_x11_intern_atom( "_NET_WM_NAME", &qt_net_wm_name );
|
||||
qt_x11_intern_atom( "_NET_WM_ICON_NAME", &qt_net_wm_icon_name );
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
URL="http://mirror.its.uidaho.edu/pub/trinity/releases/3.5.13"
|
||||
VERSION=3.5.13
|
||||
|
||||
runMgr(){
|
||||
|
||||
if [ "$1" == "qt3" ]; then
|
||||
VERSION=3.3.8d
|
||||
fi
|
||||
|
||||
wget $URL/$1-$VERSION.tar.gz
|
||||
|
||||
if [ "$2" != "" ]; then
|
||||
mv -v $1-$VERSION.tar.gz $2-$VERSION.tar.gz
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
runMgr $1 $2
|
Loading…
Reference in new issue