initial commit
This commit is contained in:
commit
9d20827c46
2469 changed files with 470994 additions and 0 deletions
|
|
@ -0,0 +1,20 @@
|
|||
diff -urN qt-x11-opensource-src-4.3.5.orig/src/gui/itemviews/qitemselectionmodel.cpp qt-x11-opensource-src-4.3.5/src/gui/itemviews/qitemselectionmodel.cpp
|
||||
--- qt-x11-opensource-src-4.3.5.orig/src/gui/itemviews/qitemselectionmodel.cpp 2008-09-02 16:12:14.000000000 +0400
|
||||
+++ qt-x11-opensource-src-4.3.5/src/gui/itemviews/qitemselectionmodel.cpp 2008-09-02 18:08:15.000000000 +0400
|
||||
@@ -1058,10 +1058,14 @@
|
||||
if (d->ranges.count() == 0 && d->currentSelection.count() == 0)
|
||||
return;
|
||||
QItemSelection selection = d->ranges;
|
||||
- selection.merge(d->currentSelection, d->currentCommand);
|
||||
+ if (!signalsBlocked()) {
|
||||
+ selection.merge(d->currentSelection, d->currentCommand);
|
||||
+ }
|
||||
d->ranges.clear();
|
||||
d->currentSelection.clear();
|
||||
- emit selectionChanged(QItemSelection(), selection);
|
||||
+ if (!signalsBlocked()) {
|
||||
+ emit selectionChanged(QItemSelection(), selection);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
21
qt-patches/002-all-all-SmoothScrollBar compatibility.patch
Normal file
21
qt-patches/002-all-all-SmoothScrollBar compatibility.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
diff -urN qt-x11-opensource-src-4.3.5.orig/src/gui/widgets/qabstractslider.h qt-x11-opensource-src-4.3.5/src/gui/widgets/qabstractslider.h
|
||||
--- qt-x11-opensource-src-4.3.5.orig/src/gui/widgets/qabstractslider.h 2008-09-02 16:12:14.000000000 +0400
|
||||
+++ qt-x11-opensource-src-4.3.5/src/gui/widgets/qabstractslider.h 2008-09-02 16:50:36.000000000 +0400
|
||||
@@ -80,7 +80,7 @@
|
||||
void setMaximum(int);
|
||||
int maximum() const;
|
||||
|
||||
- void setRange(int min, int max);
|
||||
+ virtual void setRange(int min, int max);
|
||||
|
||||
void setSingleStep(int);
|
||||
int singleStep() const;
|
||||
@@ -119,7 +119,7 @@
|
||||
void triggerAction(SliderAction action);
|
||||
|
||||
public Q_SLOTS:
|
||||
- void setValue(int);
|
||||
+ virtual void setValue(int);
|
||||
void setOrientation(Qt::Orientation);
|
||||
|
||||
Q_SIGNALS:
|
||||
12
qt-patches/003-all-all-YaTabBar compatibility.patch
Normal file
12
qt-patches/003-all-all-YaTabBar compatibility.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -urN qt-x11-opensource-src-4.3.5.orig/src/gui/widgets/qtabbar.h qt-x11-opensource-src-4.3.5/src/gui/widgets/qtabbar.h
|
||||
--- qt-x11-opensource-src-4.3.5.orig/src/gui/widgets/qtabbar.h 2008-09-02 16:12:14.000000000 +0400
|
||||
+++ qt-x11-opensource-src-4.3.5/src/gui/widgets/qtabbar.h 2008-09-02 16:13:08.000000000 +0400
|
||||
@@ -140,7 +140,7 @@
|
||||
void setUsesScrollButtons(bool useButtons);
|
||||
|
||||
public Q_SLOTS:
|
||||
- void setCurrentIndex(int index);
|
||||
+ virtual void setCurrentIndex(int index);
|
||||
|
||||
Q_SIGNALS:
|
||||
void currentChanged(int index);
|
||||
12
qt-patches/004-all-4.3-updated autoscroll region.patch
Normal file
12
qt-patches/004-all-4.3-updated autoscroll region.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -urN qt-x11-opensource-src-4.3.5.orig/src/gui/itemviews/qabstractitemview.cpp qt-x11-opensource-src-4.3.5/src/gui/itemviews/qabstractitemview.cpp
|
||||
--- qt-x11-opensource-src-4.3.5.orig/src/gui/itemviews/qabstractitemview.cpp 2008-09-02 16:12:14.000000000 +0400
|
||||
+++ qt-x11-opensource-src-4.3.5/src/gui/itemviews/qabstractitemview.cpp 2008-09-02 16:36:50.000000000 +0400
|
||||
@@ -85,7 +85,7 @@
|
||||
dropIndicatorPosition(QAbstractItemView::OnItem),
|
||||
#endif
|
||||
autoScroll(true),
|
||||
- autoScrollMargin(16),
|
||||
+ autoScrollMargin(50),
|
||||
autoScrollCount(0),
|
||||
alternatingColors(false),
|
||||
textElideMode(Qt::ElideRight),
|
||||
13
qt-patches/005-all-all-YaBoldMenu compatibility.patch
Normal file
13
qt-patches/005-all-all-YaBoldMenu compatibility.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff -urN qt-x11-opensource-src-4.3.5.orig/src/gui/widgets/qmenu.h qt-x11-opensource-src-4.3.5/src/gui/widgets/qmenu.h
|
||||
--- qt-x11-opensource-src-4.3.5.orig/src/gui/widgets/qmenu.h 2008-09-02 16:12:14.000000000 +0400
|
||||
+++ qt-x11-opensource-src-4.3.5/src/gui/widgets/qmenu.h 2008-09-02 16:37:57.000000000 +0400
|
||||
@@ -161,7 +161,8 @@
|
||||
void timerEvent(QTimerEvent *);
|
||||
bool event(QEvent *);
|
||||
bool focusNextPrevChild(bool next);
|
||||
- void initStyleOption(QStyleOptionMenuItem *option, const QAction *action) const;
|
||||
+ virtual void initStyleOption(QStyleOptionMenuItem *option, const QAction *action) const;
|
||||
+
|
||||
|
||||
private Q_SLOTS:
|
||||
void internalSetSloppyAction();
|
||||
13
qt-patches/006-win-all-hide menu gutter.patch
Normal file
13
qt-patches/006-win-all-hide menu gutter.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff -urN qt-all-opensource-src-4.3.5.orig/src/gui/styles/qwindowsvistastyle.cpp qt-all-opensource-src-4.3.5/src/gui/styles/qwindowsvistastyle.cpp
|
||||
--- qt-all-opensource-src-4.3.5.orig/src/gui/styles/qwindowsvistastyle.cpp 2008-05-26 13:06:56.000000000 +0400
|
||||
+++ qt-all-opensource-src-4.3.5/src/gui/styles/qwindowsvistastyle.cpp 2008-09-04 18:17:12.000000000 +0400
|
||||
@@ -1042,7 +1042,9 @@
|
||||
stateId = MBI_HOT;
|
||||
|
||||
XPThemeData theme2(widget, painter, QLatin1String("MENU"), MENU_BARITEM, stateId, option->rect);
|
||||
+ if (!widget->property("hide-menu-popupgutter").toBool()) {
|
||||
d->drawBackground(theme2);
|
||||
+ } // hide-menu-popupgutter
|
||||
|
||||
if (!pix.isNull())
|
||||
drawItemPixmap(painter, mbi->rect, alignment, pix);
|
||||
19
qt-patches/007-win-4.4-YaWindow minimize fix.patch
Normal file
19
qt-patches/007-win-4.4-YaWindow minimize fix.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
diff -urN qt-all-opensource-src-4.3.5.orig/src/gui/kernel/qwidget_win.cpp qt-all-opensource-src-4.3.5/src/gui/kernel/qwidget_win.cpp
|
||||
--- qt-all-opensource-src-4.3.5.orig/src/gui/kernel/qwidget_win.cpp 2008-05-26 13:06:56.000000000 +0400
|
||||
+++ qt-all-opensource-src-4.3.5/src/gui/kernel/qwidget_win.cpp 2008-09-04 18:24:04.000000000 +0400
|
||||
@@ -260,11 +260,15 @@
|
||||
if (popup)
|
||||
flags |= Qt::WindowStaysOnTopHint; // a popup stays on top
|
||||
|
||||
+// mblsha: we disable this in order to get truly borderless windows
|
||||
+// that could be minimized via taskbar button clicking
|
||||
+#if 0
|
||||
if (flags & (Qt::WindowMinMaxButtonsHint | Qt::WindowContextHelpButtonHint)) {
|
||||
flags |= Qt::WindowSystemMenuHint;
|
||||
flags |= Qt::WindowTitleHint;
|
||||
flags &= ~Qt::FramelessWindowHint;
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (sw < 0) { // get the (primary) screen size
|
||||
sw = GetSystemMetrics(SM_CXSCREEN);
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
diff -urN qt-all-opensource-src-4.3.5.orig/src/gui/kernel/qapplication.cpp qt-all-opensource-src-4.3.5/src/gui/kernel/qapplication.cpp
|
||||
--- qt-all-opensource-src-4.3.5.orig/src/gui/kernel/qapplication.cpp 2008-05-26 13:06:55.000000000 +0400
|
||||
+++ qt-all-opensource-src-4.3.5/src/gui/kernel/qapplication.cpp 2008-09-04 18:27:38.000000000 +0400
|
||||
@@ -3342,7 +3342,7 @@
|
||||
QPoint relpos = context->pos();
|
||||
bool eventAccepted = context->isAccepted();
|
||||
while (w) {
|
||||
- QContextMenuEvent ce(context->reason(), relpos, context->globalPos());
|
||||
+ QContextMenuEvent ce(context->reason(), relpos, context->globalPos(), context->modifiers());
|
||||
ce.spont = e->spontaneous();
|
||||
res = d->notify_helper(w, w == receiver ? context : &ce);
|
||||
eventAccepted = ((w == receiver) ? context : &ce)->isAccepted();
|
||||
diff -urN qt-all-opensource-src-4.3.5.orig/src/gui/kernel/qapplication_win.cpp qt-all-opensource-src-4.3.5/src/gui/kernel/qapplication_win.cpp
|
||||
--- qt-all-opensource-src-4.3.5.orig/src/gui/kernel/qapplication_win.cpp 2008-05-26 13:06:55.000000000 +0400
|
||||
+++ qt-all-opensource-src-4.3.5/src/gui/kernel/qapplication_win.cpp 2008-09-04 18:29:37.000000000 +0400
|
||||
@@ -1076,7 +1076,17 @@
|
||||
SetCursor(cW->cursor().handle());
|
||||
}
|
||||
|
||||
-
|
||||
+Qt::KeyboardModifiers qt_win_getKeyboardModifiers()
|
||||
+{
|
||||
+ Qt::KeyboardModifiers modifiers = Qt::NoModifier;
|
||||
+ if (GetKeyState(VK_SHIFT) < 0)
|
||||
+ modifiers |= Qt::ShiftModifier;
|
||||
+ if (GetKeyState(VK_CONTROL) < 0)
|
||||
+ modifiers |= Qt::ControlModifier;
|
||||
+ if (GetKeyState(VK_MENU) < 0)
|
||||
+ modifiers |= Qt::AltModifier;
|
||||
+ return modifiers;
|
||||
+}
|
||||
|
||||
/*****************************************************************************
|
||||
Routines to find a Qt widget from a screen position
|
||||
@@ -1930,7 +1940,8 @@
|
||||
}
|
||||
if (fw && fw->isEnabled()) {
|
||||
QPoint pos = fw->inputMethodQuery(Qt::ImMicroFocus).toRect().center();
|
||||
- QContextMenuEvent e(QContextMenuEvent::Keyboard, pos, fw->mapToGlobal(pos));
|
||||
+ QContextMenuEvent e(QContextMenuEvent::Keyboard, pos, fw->mapToGlobal(pos),
|
||||
+ qt_win_getKeyboardModifiers());
|
||||
result = qt_sendSpontaneousEvent(fw, &e);
|
||||
}
|
||||
}
|
||||
@@ -2739,7 +2750,8 @@
|
||||
} else if (type == QEvent::MouseButtonRelease && button == Qt::RightButton
|
||||
&& qApp->activePopupWidget() == activePopupWidget) {
|
||||
// popup still alive and received right-button-release
|
||||
- QContextMenuEvent e2(QContextMenuEvent::Mouse, pos, globalPos);
|
||||
+ QContextMenuEvent e2(QContextMenuEvent::Mouse, pos, globalPos,
|
||||
+ qt_win_getKeyboardModifiers());
|
||||
bool res2 = QApplication::sendSpontaneousEvent( target, &e2 );
|
||||
if (!res) // RMB not accepted
|
||||
res = res2 && e2.isAccepted();
|
||||
@@ -2783,7 +2795,8 @@
|
||||
// non client area events are only informational, you cannot "handle" them
|
||||
res = res && e.isAccepted() && !nonClientAreaEvent;
|
||||
if (type == QEvent::MouseButtonRelease && button == Qt::RightButton) {
|
||||
- QContextMenuEvent e2(QContextMenuEvent::Mouse, pos, QPoint(gpos.x,gpos.y));
|
||||
+ QContextMenuEvent e2(QContextMenuEvent::Mouse, pos, QPoint(gpos.x,gpos.y),
|
||||
+ qt_win_getKeyboardModifiers());
|
||||
bool res2 = QApplication::sendSpontaneousEvent(widget, &e2);
|
||||
if (!res)
|
||||
res = res2 && e2.isAccepted();
|
||||
diff -urN qt-all-opensource-src-4.3.5.orig/src/gui/kernel/qevent.cpp qt-all-opensource-src-4.3.5/src/gui/kernel/qevent.cpp
|
||||
--- qt-all-opensource-src-4.3.5.orig/src/gui/kernel/qevent.cpp 2008-05-26 13:06:56.000000000 +0400
|
||||
+++ qt-all-opensource-src-4.3.5/src/gui/kernel/qevent.cpp 2008-09-04 18:30:09.000000000 +0400
|
||||
@@ -1314,6 +1314,11 @@
|
||||
: QInputEvent(ContextMenu), p(pos), gp(globalPos), reas(reason)
|
||||
{}
|
||||
|
||||
+QContextMenuEvent::QContextMenuEvent(Reason reason, const QPoint &pos, const QPoint &globalPos,
|
||||
+ Qt::KeyboardModifiers modifiers)
|
||||
+ : QInputEvent(ContextMenu, modifiers), p(pos), gp(globalPos), reas(reason)
|
||||
+{}
|
||||
+
|
||||
#ifdef QT3_SUPPORT
|
||||
/*!
|
||||
Constructs a context menu event with the given \a reason for the
|
||||
diff -urN qt-all-opensource-src-4.3.5.orig/src/gui/kernel/qevent.h qt-all-opensource-src-4.3.5/src/gui/kernel/qevent.h
|
||||
--- qt-all-opensource-src-4.3.5.orig/src/gui/kernel/qevent.h 2008-05-26 13:06:56.000000000 +0400
|
||||
+++ qt-all-opensource-src-4.3.5/src/gui/kernel/qevent.h 2008-09-04 18:30:36.000000000 +0400
|
||||
@@ -380,6 +380,8 @@
|
||||
public:
|
||||
enum Reason { Mouse, Keyboard, Other };
|
||||
|
||||
+ QContextMenuEvent(Reason reason, const QPoint &pos, const QPoint &globalPos,
|
||||
+ Qt::KeyboardModifiers modifiers);
|
||||
QContextMenuEvent(Reason reason, const QPoint &pos, const QPoint &globalPos);
|
||||
QContextMenuEvent(Reason reason, const QPoint &pos);
|
||||
~QContextMenuEvent();
|
||||
11
qt-patches/009-all-all-disable inlining when debugging.patch
Normal file
11
qt-patches/009-all-all-disable inlining when debugging.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
diff -urN qt-mac-opensource-src-4.4.2.orig/mkspecs/common/g++.conf qt-mac-opensource-src-4.4.2/mkspecs/common/g++.conf
|
||||
--- qt-mac-opensource-src-4.4.2.orig/mkspecs/common/g++.conf 2008-09-21 01:43:49.000000000 +0400
|
||||
+++ qt-mac-opensource-src-4.4.2/mkspecs/common/g++.conf 2008-09-21 01:50:26.000000000 +0400
|
||||
@@ -9,6 +9,7 @@
|
||||
QMAKE_CFLAGS_WARN_OFF += -w
|
||||
QMAKE_CFLAGS_RELEASE += -O2
|
||||
QMAKE_CFLAGS_DEBUG += -g
|
||||
+QMAKE_CFLAGS_DEBUG += -fno-inline -fno-default-inline
|
||||
QMAKE_CFLAGS_SHLIB += -fPIC
|
||||
QMAKE_CFLAGS_STATIC_LIB += -fPIC
|
||||
QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
|
||||
142
qt-patches/010-win-4.4-win improvements.patch
Normal file
142
qt-patches/010-win-4.4-win improvements.patch
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
diff -urN qt-win-commercial-src-4.4.3.orig/mkspecs/win32-msvc/qmake.conf qt-win-commercial-src-4.4.3/mkspecs/win32-msvc/qmake.conf
|
||||
--- qt-win-commercial-src-4.4.3.orig/mkspecs/win32-msvc/qmake.conf 2008-09-27 11:00:54.000000000 +0400
|
||||
+++ qt-win-commercial-src-4.4.3/mkspecs/win32-msvc/qmake.conf 2008-10-02 13:48:10.000000000 +0400
|
||||
@@ -19,7 +19,7 @@
|
||||
QMAKE_CFLAGS = -nologo -Zm200
|
||||
QMAKE_CFLAGS_WARN_ON = -W3
|
||||
QMAKE_CFLAGS_WARN_OFF = -W0
|
||||
-QMAKE_CFLAGS_RELEASE = -O1 -MD
|
||||
+QMAKE_CFLAGS_RELEASE = -O1 -MT
|
||||
QMAKE_CFLAGS_DEBUG = -Zi -MDd
|
||||
QMAKE_CFLAGS_YACC =
|
||||
|
||||
diff -urN qt-win-commercial-src-4.4.3.orig/mkspecs/win32-msvc.net/qmake.conf qt-win-commercial-src-4.4.3/mkspecs/win32-msvc.net/qmake.conf
|
||||
--- qt-win-commercial-src-4.4.3.orig/mkspecs/win32-msvc.net/qmake.conf 2008-09-27 11:00:54.000000000 +0400
|
||||
+++ qt-win-commercial-src-4.4.3/mkspecs/win32-msvc.net/qmake.conf 2008-10-02 13:48:00.000000000 +0400
|
||||
@@ -20,7 +20,7 @@
|
||||
QMAKE_CFLAGS = -nologo -Zm300
|
||||
QMAKE_CFLAGS_WARN_ON = -W3
|
||||
QMAKE_CFLAGS_WARN_OFF = -W0
|
||||
-QMAKE_CFLAGS_RELEASE = -O2 -MD
|
||||
+QMAKE_CFLAGS_RELEASE = -O2 -MT
|
||||
QMAKE_CFLAGS_DEBUG = -Zi -MDd
|
||||
QMAKE_CFLAGS_YACC =
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
||||
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
-QMAKE_CXXFLAGS_STL_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_STL_ON =
|
||||
QMAKE_CXXFLAGS_STL_OFF =
|
||||
QMAKE_CXXFLAGS_RTTI_ON = -GR
|
||||
QMAKE_CXXFLAGS_RTTI_OFF =
|
||||
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_EXCEPTIONS_ON =
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
|
||||
|
||||
QMAKE_INCDIR =
|
||||
diff -urN qt-win-commercial-src-4.4.3.orig/mkspecs/win32-msvc2002/qmake.conf qt-win-commercial-src-4.4.3/mkspecs/win32-msvc2002/qmake.conf
|
||||
--- qt-win-commercial-src-4.4.3.orig/mkspecs/win32-msvc2002/qmake.conf 2008-09-27 11:00:54.000000000 +0400
|
||||
+++ qt-win-commercial-src-4.4.3/mkspecs/win32-msvc2002/qmake.conf 2008-10-02 13:47:51.000000000 +0400
|
||||
@@ -19,7 +19,7 @@
|
||||
QMAKE_CFLAGS = -nologo -Zm300
|
||||
QMAKE_CFLAGS_WARN_ON = -W3
|
||||
QMAKE_CFLAGS_WARN_OFF = -W0
|
||||
-QMAKE_CFLAGS_RELEASE = -O2 -MD
|
||||
+QMAKE_CFLAGS_RELEASE = -O2 -MT
|
||||
QMAKE_CFLAGS_DEBUG = -Zi -MDd
|
||||
QMAKE_CFLAGS_YACC =
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
||||
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
-QMAKE_CXXFLAGS_STL_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_STL_ON =
|
||||
QMAKE_CXXFLAGS_STL_OFF =
|
||||
QMAKE_CXXFLAGS_RTTI_ON = -GR
|
||||
QMAKE_CXXFLAGS_RTTI_OFF =
|
||||
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_EXCEPTIONS_ON =
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
|
||||
|
||||
QMAKE_INCDIR =
|
||||
diff -urN qt-win-commercial-src-4.4.3.orig/mkspecs/win32-msvc2003/qmake.conf qt-win-commercial-src-4.4.3/mkspecs/win32-msvc2003/qmake.conf
|
||||
--- qt-win-commercial-src-4.4.3.orig/mkspecs/win32-msvc2003/qmake.conf 2008-09-27 11:00:54.000000000 +0400
|
||||
+++ qt-win-commercial-src-4.4.3/mkspecs/win32-msvc2003/qmake.conf 2008-10-02 13:47:41.000000000 +0400
|
||||
@@ -19,7 +19,7 @@
|
||||
QMAKE_CFLAGS = -nologo -Zm300
|
||||
QMAKE_CFLAGS_WARN_ON = -W3
|
||||
QMAKE_CFLAGS_WARN_OFF = -W0
|
||||
-QMAKE_CFLAGS_RELEASE = -O2 -MD
|
||||
+QMAKE_CFLAGS_RELEASE = -O2 -MT
|
||||
QMAKE_CFLAGS_DEBUG = -Zi -MDd
|
||||
QMAKE_CFLAGS_YACC =
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
||||
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
-QMAKE_CXXFLAGS_STL_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_STL_ON =
|
||||
QMAKE_CXXFLAGS_STL_OFF =
|
||||
QMAKE_CXXFLAGS_RTTI_ON = -GR
|
||||
QMAKE_CXXFLAGS_RTTI_OFF =
|
||||
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_EXCEPTIONS_ON =
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
|
||||
|
||||
QMAKE_INCDIR =
|
||||
diff -urN qt-win-commercial-src-4.4.3.orig/mkspecs/win32-msvc2005/qmake.conf qt-win-commercial-src-4.4.3/mkspecs/win32-msvc2005/qmake.conf
|
||||
--- qt-win-commercial-src-4.4.3.orig/mkspecs/win32-msvc2005/qmake.conf 2008-09-27 11:00:54.000000000 +0400
|
||||
+++ qt-win-commercial-src-4.4.3/mkspecs/win32-msvc2005/qmake.conf 2008-10-02 13:47:32.000000000 +0400
|
||||
@@ -19,7 +19,7 @@
|
||||
QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t-
|
||||
QMAKE_CFLAGS_WARN_ON = -W3
|
||||
QMAKE_CFLAGS_WARN_OFF = -W0
|
||||
-QMAKE_CFLAGS_RELEASE = -O2 -MD
|
||||
+QMAKE_CFLAGS_RELEASE = -O2 -MT
|
||||
QMAKE_CFLAGS_DEBUG = -Zi -MDd
|
||||
QMAKE_CFLAGS_YACC =
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
||||
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
-QMAKE_CXXFLAGS_STL_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_STL_ON =
|
||||
QMAKE_CXXFLAGS_STL_OFF =
|
||||
QMAKE_CXXFLAGS_RTTI_ON = -GR
|
||||
QMAKE_CXXFLAGS_RTTI_OFF =
|
||||
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_EXCEPTIONS_ON =
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
|
||||
|
||||
QMAKE_INCDIR =
|
||||
diff -urN qt-win-commercial-src-4.4.3.orig/mkspecs/win32-msvc2008/qmake.conf qt-win-commercial-src-4.4.3/mkspecs/win32-msvc2008/qmake.conf
|
||||
--- qt-win-commercial-src-4.4.3.orig/mkspecs/win32-msvc2008/qmake.conf 2008-09-27 11:00:54.000000000 +0400
|
||||
+++ qt-win-commercial-src-4.4.3/mkspecs/win32-msvc2008/qmake.conf 2008-10-02 13:47:23.000000000 +0400
|
||||
@@ -19,7 +19,7 @@
|
||||
QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t-
|
||||
QMAKE_CFLAGS_WARN_ON = -W3
|
||||
QMAKE_CFLAGS_WARN_OFF = -W0
|
||||
-QMAKE_CFLAGS_RELEASE = -O2 -MD
|
||||
+QMAKE_CFLAGS_RELEASE = -O2 -MT
|
||||
QMAKE_CFLAGS_DEBUG = -Zi -MDd
|
||||
QMAKE_CFLAGS_YACC =
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
||||
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
-QMAKE_CXXFLAGS_STL_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_STL_ON =
|
||||
QMAKE_CXXFLAGS_STL_OFF =
|
||||
QMAKE_CXXFLAGS_RTTI_ON = -GR
|
||||
QMAKE_CXXFLAGS_RTTI_OFF =
|
||||
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_EXCEPTIONS_ON =
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
|
||||
|
||||
QMAKE_INCDIR =
|
||||
148
qt-patches/010-win-4.5-win improvements.patch
Normal file
148
qt-patches/010-win-4.5-win improvements.patch
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
diff --git a/mkspecs/win32-msvc.net/qmake.conf b/mkspecs/win32-msvc.net/qmake.conf
|
||||
index 89fa00d..7f9401d 100644
|
||||
--- a/mkspecs/win32-msvc.net/qmake.conf
|
||||
+++ b/mkspecs/win32-msvc.net/qmake.conf
|
||||
@@ -20,7 +20,7 @@ QMAKE_YACCFLAGS = -d
|
||||
QMAKE_CFLAGS = -nologo -Zm300
|
||||
QMAKE_CFLAGS_WARN_ON = -W3
|
||||
QMAKE_CFLAGS_WARN_OFF = -W0
|
||||
-QMAKE_CFLAGS_RELEASE = -O2 -MD
|
||||
+QMAKE_CFLAGS_RELEASE = -O2 -MT
|
||||
QMAKE_CFLAGS_DEBUG = -Zi -MDd
|
||||
QMAKE_CFLAGS_YACC =
|
||||
|
||||
@@ -31,11 +31,11 @@ QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
||||
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
-QMAKE_CXXFLAGS_STL_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_STL_ON =
|
||||
QMAKE_CXXFLAGS_STL_OFF =
|
||||
QMAKE_CXXFLAGS_RTTI_ON = -GR
|
||||
QMAKE_CXXFLAGS_RTTI_OFF =
|
||||
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_EXCEPTIONS_ON =
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
|
||||
|
||||
QMAKE_INCDIR =
|
||||
diff --git a/mkspecs/win32-msvc/qmake.conf b/mkspecs/win32-msvc/qmake.conf
|
||||
index 64ab84a..7bc0d78 100644
|
||||
--- a/mkspecs/win32-msvc/qmake.conf
|
||||
+++ b/mkspecs/win32-msvc/qmake.conf
|
||||
@@ -19,7 +19,7 @@ QMAKE_YACCFLAGS = -d
|
||||
QMAKE_CFLAGS = -nologo -Zm200
|
||||
QMAKE_CFLAGS_WARN_ON = -W3
|
||||
QMAKE_CFLAGS_WARN_OFF = -W0
|
||||
-QMAKE_CFLAGS_RELEASE = -O1 -MD
|
||||
+QMAKE_CFLAGS_RELEASE = -O1 -MT
|
||||
QMAKE_CFLAGS_DEBUG = -Zi -MDd
|
||||
QMAKE_CFLAGS_YACC =
|
||||
|
||||
diff --git a/mkspecs/win32-msvc2002/qmake.conf b/mkspecs/win32-msvc2002/qmake.conf
|
||||
index 13fbfb0..1622e6b 100644
|
||||
--- a/mkspecs/win32-msvc2002/qmake.conf
|
||||
+++ b/mkspecs/win32-msvc2002/qmake.conf
|
||||
@@ -19,7 +19,7 @@ QMAKE_YACCFLAGS = -d
|
||||
QMAKE_CFLAGS = -nologo -Zm300
|
||||
QMAKE_CFLAGS_WARN_ON = -W3
|
||||
QMAKE_CFLAGS_WARN_OFF = -W0
|
||||
-QMAKE_CFLAGS_RELEASE = -O2 -MD
|
||||
+QMAKE_CFLAGS_RELEASE = -O2 -MT
|
||||
QMAKE_CFLAGS_DEBUG = -Zi -MDd
|
||||
QMAKE_CFLAGS_YACC =
|
||||
|
||||
@@ -30,11 +30,11 @@ QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
||||
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
-QMAKE_CXXFLAGS_STL_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_STL_ON =
|
||||
QMAKE_CXXFLAGS_STL_OFF =
|
||||
QMAKE_CXXFLAGS_RTTI_ON = -GR
|
||||
QMAKE_CXXFLAGS_RTTI_OFF =
|
||||
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_EXCEPTIONS_ON =
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
|
||||
|
||||
QMAKE_INCDIR =
|
||||
diff --git a/mkspecs/win32-msvc2003/qmake.conf b/mkspecs/win32-msvc2003/qmake.conf
|
||||
index e92df12..519177f 100644
|
||||
--- a/mkspecs/win32-msvc2003/qmake.conf
|
||||
+++ b/mkspecs/win32-msvc2003/qmake.conf
|
||||
@@ -19,7 +19,7 @@ QMAKE_YACCFLAGS = -d
|
||||
QMAKE_CFLAGS = -nologo -Zm300
|
||||
QMAKE_CFLAGS_WARN_ON = -W3
|
||||
QMAKE_CFLAGS_WARN_OFF = -W0
|
||||
-QMAKE_CFLAGS_RELEASE = -O2 -MD
|
||||
+QMAKE_CFLAGS_RELEASE = -O2 -MT
|
||||
QMAKE_CFLAGS_DEBUG = -Zi -MDd
|
||||
QMAKE_CFLAGS_YACC =
|
||||
|
||||
@@ -30,11 +30,11 @@ QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
||||
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
-QMAKE_CXXFLAGS_STL_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_STL_ON =
|
||||
QMAKE_CXXFLAGS_STL_OFF =
|
||||
QMAKE_CXXFLAGS_RTTI_ON = -GR
|
||||
QMAKE_CXXFLAGS_RTTI_OFF =
|
||||
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_EXCEPTIONS_ON =
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
|
||||
|
||||
QMAKE_INCDIR =
|
||||
diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf
|
||||
index 00287cb..45c5427 100644
|
||||
--- a/mkspecs/win32-msvc2005/qmake.conf
|
||||
+++ b/mkspecs/win32-msvc2005/qmake.conf
|
||||
@@ -19,7 +19,7 @@ QMAKE_YACCFLAGS = -d
|
||||
QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t-
|
||||
QMAKE_CFLAGS_WARN_ON = -W3
|
||||
QMAKE_CFLAGS_WARN_OFF = -W0
|
||||
-QMAKE_CFLAGS_RELEASE = -O2 -MD -GL
|
||||
+QMAKE_CFLAGS_RELEASE = -O2 -MT -GL
|
||||
QMAKE_CFLAGS_DEBUG = -Zi -MDd
|
||||
QMAKE_CFLAGS_YACC =
|
||||
|
||||
@@ -30,11 +30,11 @@ QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
||||
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
-QMAKE_CXXFLAGS_STL_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_STL_ON =
|
||||
QMAKE_CXXFLAGS_STL_OFF =
|
||||
QMAKE_CXXFLAGS_RTTI_ON = -GR
|
||||
QMAKE_CXXFLAGS_RTTI_OFF =
|
||||
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_EXCEPTIONS_ON =
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
|
||||
|
||||
QMAKE_INCDIR =
|
||||
diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf
|
||||
index b56b41c..61aee6d 100644
|
||||
--- a/mkspecs/win32-msvc2008/qmake.conf
|
||||
+++ b/mkspecs/win32-msvc2008/qmake.conf
|
||||
@@ -19,7 +19,7 @@ QMAKE_YACCFLAGS = -d
|
||||
QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t-
|
||||
QMAKE_CFLAGS_WARN_ON = -W3
|
||||
QMAKE_CFLAGS_WARN_OFF = -W0
|
||||
-QMAKE_CFLAGS_RELEASE = -O2 -MD -GL
|
||||
+QMAKE_CFLAGS_RELEASE = -O2 -MT -GL
|
||||
QMAKE_CFLAGS_DEBUG = -Zi -MDd
|
||||
QMAKE_CFLAGS_YACC =
|
||||
|
||||
@@ -30,11 +30,11 @@ QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
||||
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
-QMAKE_CXXFLAGS_STL_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_STL_ON =
|
||||
QMAKE_CXXFLAGS_STL_OFF =
|
||||
QMAKE_CXXFLAGS_RTTI_ON = -GR
|
||||
QMAKE_CXXFLAGS_RTTI_OFF =
|
||||
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
|
||||
+QMAKE_CXXFLAGS_EXCEPTIONS_ON =
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
|
||||
|
||||
QMAKE_INCDIR =
|
||||
12
qt-patches/011-all-all-multiline tabs enabler.patch
Normal file
12
qt-patches/011-all-all-multiline tabs enabler.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -urN qt-mac-opensource-src-4.4.2.orig/src/gui/widgets/qtabbar.h qt-mac-opensource-src-4.4.2/src/gui/widgets/qtabbar.h
|
||||
--- qt-mac-opensource-src-4.4.2.orig/src/gui/widgets/qtabbar.h 2008-09-11 19:33:39.000000000 +0400
|
||||
+++ qt-mac-opensource-src-4.4.2/src/gui/widgets/qtabbar.h 2008-10-06 12:55:01.000000000 +0400
|
||||
@@ -122,7 +122,7 @@
|
||||
void setTabData(int index, const QVariant &data);
|
||||
QVariant tabData(int index) const;
|
||||
|
||||
- QRect tabRect(int index) const;
|
||||
+ virtual QRect tabRect(int index) const;
|
||||
int tabAt(const QPoint &pos) const;
|
||||
|
||||
|
||||
29
qt-patches/012-win-all-com server installation.patch
Normal file
29
qt-patches/012-win-all-com server installation.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
diff -urN qt-win-commercial-src-4.4.3.orig/src/activeqt/control/qaxserver.cpp qt-win-commercial-src-4.4.3_mt4_static/src/activeqt/control/qaxserver.cpp
|
||||
--- qt-win-commercial-src-4.4.3.orig/src/activeqt/control/qaxserver.cpp 2008-09-27 11:00:56.000000000 +0400
|
||||
+++ qt-win-commercial-src-4.4.3_mt4_static/src/activeqt/control/qaxserver.cpp 2008-10-20 16:19:52.000000000 +0400
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <qt_windows.h>
|
||||
#include <olectl.h>
|
||||
+#include <shlobj.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -220,10 +221,14 @@
|
||||
|
||||
// check whether the user has permission to write to HKLM\Software\Classes
|
||||
// if not, use HKCU\Software\Classes
|
||||
- QString keyPath(QLatin1String("HKEY_LOCAL_MACHINE\\Software\\Classes"));
|
||||
- QSettings test(keyPath, QSettings::NativeFormat);
|
||||
- if (!test.isWritable())
|
||||
+ // QString keyPath(QLatin1String("HKEY_LOCAL_MACHINE\\Software\\Classes"));
|
||||
+ // QSettings test(keyPath, QSettings::NativeFormat);
|
||||
+ // if (!test.isWritable())
|
||||
+ // keyPath = QLatin1String("HKEY_CURRENT_USER\\Software\\Classes");
|
||||
+ QString keyPath(QLatin1String("HKEY_CLASSES_ROOT"));
|
||||
+ if (!IsUserAnAdmin()) {
|
||||
keyPath = QLatin1String("HKEY_CURRENT_USER\\Software\\Classes");
|
||||
+ }
|
||||
|
||||
QSettings settings(keyPath, QSettings::NativeFormat);
|
||||
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
diff -urN qt-win-commercial-src-4.4.3.orig/src/gui/widgets/qscrollbar.cpp qt-win-commercial-src-4.4.3_mt4_static/src/gui/widgets/qscrollbar.cpp
|
||||
--- qt-win-commercial-src-4.4.3.orig/src/gui/widgets/qscrollbar.cpp 2008-09-27 11:00:58.000000000 +0400
|
||||
+++ qt-win-commercial-src-4.4.3_mt4_static/src/gui/widgets/qscrollbar.cpp 2008-12-04 19:26:48.000000000 +0300
|
||||
@@ -318,6 +318,15 @@
|
||||
option->upsideDown = d->invertedAppearance;
|
||||
if (d->orientation == Qt::Horizontal)
|
||||
option->state |= QStyle::State_Horizontal;
|
||||
+
|
||||
+ option->subControls = QStyle::SC_All;
|
||||
+ if (d->pressedControl) {
|
||||
+ option->activeSubControls = (QStyle::SubControl)d->pressedControl;
|
||||
+ if (!d->pointerOutsidePressedControl)
|
||||
+ option->state |= QStyle::State_Sunken;
|
||||
+ } else {
|
||||
+ option->activeSubControls = (QStyle::SubControl)d->hoverControl;
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
@@ -529,14 +538,6 @@
|
||||
QPainter p(this);
|
||||
QStyleOptionSlider opt;
|
||||
initStyleOption(&opt);
|
||||
- opt.subControls = QStyle::SC_All;
|
||||
- if (d->pressedControl) {
|
||||
- opt.activeSubControls = (QStyle::SubControl)d->pressedControl;
|
||||
- if (!d->pointerOutsidePressedControl)
|
||||
- opt.state |= QStyle::State_Sunken;
|
||||
- } else {
|
||||
- opt.activeSubControls = (QStyle::SubControl)d->hoverControl;
|
||||
- }
|
||||
style()->drawComplexControl(QStyle::CC_ScrollBar, &opt, &p, this);
|
||||
}
|
||||
|
||||
diff -urN qt-win-commercial-src-4.4.3.orig/src/gui/widgets/qscrollbar.h qt-win-commercial-src-4.4.3_mt4_static/src/gui/widgets/qscrollbar.h
|
||||
--- qt-win-commercial-src-4.4.3.orig/src/gui/widgets/qscrollbar.h 2008-09-27 11:00:58.000000000 +0400
|
||||
+++ qt-win-commercial-src-4.4.3_mt4_static/src/gui/widgets/qscrollbar.h 2008-12-04 19:26:20.000000000 +0300
|
||||
@@ -73,7 +73,7 @@
|
||||
#ifndef QT_NO_CONTEXTMENU
|
||||
void contextMenuEvent(QContextMenuEvent *);
|
||||
#endif
|
||||
- void initStyleOption(QStyleOptionSlider *option) const;
|
||||
+ virtual void initStyleOption(QStyleOptionSlider *option) const;
|
||||
|
||||
#ifdef QT3_SUPPORT
|
||||
public:
|
||||
313
qt-patches/014-win-4.5-breakpad on exceptions.patch
Normal file
313
qt-patches/014-win-4.5-breakpad on exceptions.patch
Normal file
|
|
@ -0,0 +1,313 @@
|
|||
diff --git a/src/corelib/concurrent/qtconcurrentthreadengine.cpp b/src/corelib/concurrent/qtconcurrentthreadengine.cpp
|
||||
index 97dbb91..d751248 100644
|
||||
--- a/src/corelib/concurrent/qtconcurrentthreadengine.cpp
|
||||
+++ b/src/corelib/concurrent/qtconcurrentthreadengine.cpp
|
||||
@@ -38,6 +38,23 @@
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
+#if defined(Q_WS_WIN) && !defined(Q_CC_GNU)
|
||||
+#include <windows.h>
|
||||
+
|
||||
+extern int qt_breakpad_handleException(void* exceptionInfo);
|
||||
+
|
||||
+#define BREAKPAD_TRY \
|
||||
+ __try {
|
||||
+#define BREAKPAD_EXCEPT \
|
||||
+ } \
|
||||
+ __except(qt_breakpad_handleException(GetExceptionInformation())) { \
|
||||
+ throw; \
|
||||
+ }
|
||||
+#else
|
||||
+#define BREAKPAD_TRY /* noop */
|
||||
+#define BREAKPAD_EXCEPT /* noop */
|
||||
+#endif
|
||||
+
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtConcurrent {
|
||||
@@ -65,15 +82,20 @@ void ThreadEngineBase::startBlocking()
|
||||
startThreads();
|
||||
|
||||
bool throttled = false;
|
||||
+#if 0
|
||||
#ifndef QT_NO_EXCEPTIONS
|
||||
try {
|
||||
#endif
|
||||
+#endif // if 0
|
||||
+BREAKPAD_TRY
|
||||
while (threadFunction() == ThrottleThread) {
|
||||
if (threadThrottleExit()) {
|
||||
throttled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
+BREAKPAD_EXCEPT
|
||||
+#if 0
|
||||
#ifndef QT_NO_EXCEPTIONS
|
||||
} catch (QtConcurrent::Exception &e) {
|
||||
handleException(e);
|
||||
@@ -81,6 +103,7 @@ void ThreadEngineBase::startBlocking()
|
||||
handleException(QtConcurrent::UnhandledException());
|
||||
}
|
||||
#endif
|
||||
+#endif // if 0
|
||||
|
||||
if (throttled == false) {
|
||||
semaphore.release();
|
||||
diff --git a/src/corelib/concurrent/qthreadpool.cpp b/src/corelib/concurrent/qthreadpool.cpp
|
||||
index 4d49a0c..e0ac97a 100644
|
||||
--- a/src/corelib/concurrent/qthreadpool.cpp
|
||||
+++ b/src/corelib/concurrent/qthreadpool.cpp
|
||||
@@ -39,6 +39,23 @@
|
||||
|
||||
#ifndef QT_NO_THREAD
|
||||
|
||||
+#if defined(Q_WS_WIN) && !defined(Q_CC_GNU)
|
||||
+#include <windows.h>
|
||||
+
|
||||
+extern int qt_breakpad_handleException(void* exceptionInfo);
|
||||
+
|
||||
+#define BREAKPAD_TRY \
|
||||
+ __try {
|
||||
+#define BREAKPAD_EXCEPT \
|
||||
+ } \
|
||||
+ __except(qt_breakpad_handleException(GetExceptionInformation())) { \
|
||||
+ throw; \
|
||||
+ }
|
||||
+#else
|
||||
+#define BREAKPAD_TRY /* noop */
|
||||
+#define BREAKPAD_EXCEPT /* noop */
|
||||
+#endif
|
||||
+
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
inline bool operator<(int priority, const QPair<QRunnable *, int> &p)
|
||||
@@ -95,10 +112,15 @@ void QThreadPoolThread::run()
|
||||
|
||||
// run the task
|
||||
locker.unlock();
|
||||
+#if 0
|
||||
#ifndef QT_NO_EXCEPTIONS
|
||||
try {
|
||||
#endif
|
||||
+#endif // if 0
|
||||
+BREAKPAD_TRY
|
||||
r->run();
|
||||
+BREAKPAD_EXCEPT
|
||||
+#if 0
|
||||
#ifndef QT_NO_EXCEPTIONS
|
||||
} catch (...) {
|
||||
qWarning("Qt Concurrent has caught an exception thrown from a worker thread.\n"
|
||||
@@ -108,6 +130,7 @@ void QThreadPoolThread::run()
|
||||
throw;
|
||||
}
|
||||
#endif
|
||||
+#endif // if 0
|
||||
locker.relock();
|
||||
|
||||
if (autoDelete && !--r->ref)
|
||||
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
|
||||
index 6d3d79e..5da9b6a 100644
|
||||
--- a/src/corelib/kernel/qcoreapplication.cpp
|
||||
+++ b/src/corelib/kernel/qcoreapplication.cpp
|
||||
@@ -78,6 +78,23 @@
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
+#if defined(Q_WS_WIN) && !defined(Q_CC_GNU)
|
||||
+#include <windows.h>
|
||||
+
|
||||
+extern int qt_breakpad_handleException(void* exceptionInfo);
|
||||
+
|
||||
+#define BREAKPAD_TRY \
|
||||
+ __try {
|
||||
+#define BREAKPAD_EXCEPT \
|
||||
+ } \
|
||||
+ __except(qt_breakpad_handleException(GetExceptionInformation())) { \
|
||||
+ throw; \
|
||||
+ }
|
||||
+#else
|
||||
+#define BREAKPAD_TRY /* noop */
|
||||
+#define BREAKPAD_EXCEPT /* noop */
|
||||
+#endif
|
||||
+
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
|
||||
@@ -587,15 +604,23 @@ bool QCoreApplication::notifyInternal(QObject *receiver, QEvent *event)
|
||||
#endif
|
||||
|
||||
#if defined(QT_NO_EXCEPTIONS)
|
||||
+BREAKPAD_TRY
|
||||
bool returnValue = notify(receiver, event);
|
||||
+BREAKPAD_EXCEPT
|
||||
#else
|
||||
bool returnValue;
|
||||
+#if 0
|
||||
try {
|
||||
+#endif // if 0
|
||||
+BREAKPAD_TRY
|
||||
returnValue = notify(receiver, event);
|
||||
+BREAKPAD_EXCEPT
|
||||
+#if 0
|
||||
} catch(...) {
|
||||
--threadData->loopLevel;
|
||||
throw;
|
||||
}
|
||||
+#endif // if 0
|
||||
#endif
|
||||
|
||||
#ifdef QT_JAMBI_BUILD
|
||||
diff --git a/src/corelib/kernel/qeventloop.cpp b/src/corelib/kernel/qeventloop.cpp
|
||||
index 8071a51..5b3b344 100644
|
||||
--- a/src/corelib/kernel/qeventloop.cpp
|
||||
+++ b/src/corelib/kernel/qeventloop.cpp
|
||||
@@ -43,6 +43,23 @@
|
||||
#include "qobject_p.h"
|
||||
#include <private/qthread_p.h>
|
||||
|
||||
+#if defined(Q_WS_WIN) && !defined(Q_CC_GNU)
|
||||
+#include <windows.h>
|
||||
+
|
||||
+extern int qt_breakpad_handleException(void* exceptionInfo);
|
||||
+
|
||||
+#define BREAKPAD_TRY \
|
||||
+ __try {
|
||||
+#define BREAKPAD_EXCEPT \
|
||||
+ } \
|
||||
+ __except(qt_breakpad_handleException(GetExceptionInformation())) { \
|
||||
+ throw; \
|
||||
+ }
|
||||
+#else
|
||||
+#define BREAKPAD_TRY /* noop */
|
||||
+#define BREAKPAD_EXCEPT /* noop */
|
||||
+#endif
|
||||
+
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEventLoopPrivate : public QObjectPrivate
|
||||
@@ -187,12 +204,19 @@ int QEventLoop::exec(ProcessEventsFlags flags)
|
||||
QCoreApplication::removePostedEvents(qApp, QEvent::Quit);
|
||||
|
||||
#if defined(QT_NO_EXCEPTIONS)
|
||||
+BREAKPAD_TRY
|
||||
while (!d->exit)
|
||||
processEvents(flags | WaitForMoreEvents | EventLoopExec);
|
||||
+BREAKPAD_EXCEPT
|
||||
#else
|
||||
+#if 0
|
||||
try {
|
||||
+#endif // if 0
|
||||
+BREAKPAD_TRY
|
||||
while (!d->exit)
|
||||
processEvents(flags | WaitForMoreEvents | EventLoopExec);
|
||||
+BREAKPAD_EXCEPT
|
||||
+#if 0
|
||||
} catch (...) {
|
||||
qWarning("Qt has caught an exception thrown from an event handler. Throwing\n"
|
||||
"exceptions from an event handler is not supported in Qt. You must\n"
|
||||
@@ -207,6 +231,7 @@ int QEventLoop::exec(ProcessEventsFlags flags)
|
||||
|
||||
throw;
|
||||
}
|
||||
+#endif // if 0
|
||||
#endif
|
||||
|
||||
// copied above
|
||||
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
|
||||
index ae645b8..b15552f 100644
|
||||
--- a/src/corelib/kernel/qobject.cpp
|
||||
+++ b/src/corelib/kernel/qobject.cpp
|
||||
@@ -59,6 +59,42 @@
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
|
||||
+#if defined(Q_WS_WIN) && !defined(Q_CC_GNU)
|
||||
+typedef int (__stdcall *BREAKPAD_HandleException)(void*);
|
||||
+
|
||||
+static BREAKPAD_HandleException qt_breakpad_handleExceptionCallback = 0;
|
||||
+
|
||||
+void qt_breakpad_setHandleExceptionCallback(BREAKPAD_HandleException callback)
|
||||
+{
|
||||
+ qt_breakpad_handleExceptionCallback = callback;
|
||||
+}
|
||||
+
|
||||
+int qt_breakpad_handleException(void* exceptionInfo)
|
||||
+{
|
||||
+ if (qt_breakpad_handleExceptionCallback) {
|
||||
+ return qt_breakpad_handleExceptionCallback(exceptionInfo);
|
||||
+ return EXCEPTION_EXECUTE_HANDLER;
|
||||
+ }
|
||||
+
|
||||
+ return EXCEPTION_CONTINUE_SEARCH;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#if defined(Q_WS_WIN) && !defined(Q_CC_GNU)
|
||||
+extern int qt_breakpad_handleException(void* exceptionInfo);
|
||||
+
|
||||
+#define BREAKPAD_TRY \
|
||||
+ __try {
|
||||
+#define BREAKPAD_EXCEPT \
|
||||
+ } \
|
||||
+ __except(qt_breakpad_handleException(GetExceptionInformation())) { \
|
||||
+ throw; \
|
||||
+ }
|
||||
+#else
|
||||
+#define BREAKPAD_TRY /* noop */
|
||||
+#define BREAKPAD_EXCEPT /* noop */
|
||||
+#endif
|
||||
+
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
static int DIRECT_CONNECTION_ONLY = 0;
|
||||
@@ -1098,14 +1133,22 @@ bool QObject::event(QEvent *e)
|
||||
QObjectPrivate::Sender * const previousSender =
|
||||
QObjectPrivate::setCurrentSender(this, ¤tSender);
|
||||
#if defined(QT_NO_EXCEPTIONS)
|
||||
+BREAKPAD_TRY
|
||||
mce->placeMetaCall(this);
|
||||
+BREAKPAD_EXCEPT
|
||||
#else
|
||||
+#if 0
|
||||
try {
|
||||
+#endif // if 0
|
||||
+BREAKPAD_TRY
|
||||
mce->placeMetaCall(this);
|
||||
+BREAKPAD_EXCEPT
|
||||
+#if 0
|
||||
} catch (...) {
|
||||
QObjectPrivate::resetCurrentSender(this, ¤tSender, previousSender);
|
||||
throw;
|
||||
}
|
||||
+#endif // if 0
|
||||
#endif
|
||||
QObjectPrivate::resetCurrentSender(this, ¤tSender, previousSender);
|
||||
break;
|
||||
@@ -3049,10 +3092,17 @@ void QMetaObject::activate(QObject *sender, int from_signal_index, int to_signal
|
||||
}
|
||||
|
||||
#if defined(QT_NO_EXCEPTIONS)
|
||||
+BREAKPAD_TRY
|
||||
receiver->qt_metacall(QMetaObject::InvokeMetaMethod, method, argv ? argv : empty_argv);
|
||||
+BREAKPAD_EXCEPT
|
||||
#else
|
||||
+#if 0
|
||||
try {
|
||||
+#endif // if 0
|
||||
+BREAKPAD_TRY
|
||||
receiver->qt_metacall(QMetaObject::InvokeMetaMethod, method, argv ? argv : empty_argv);
|
||||
+BREAKPAD_EXCEPT
|
||||
+#if 0
|
||||
} catch (...) {
|
||||
locker.relock();
|
||||
|
||||
@@ -3064,6 +3114,7 @@ void QMetaObject::activate(QObject *sender, int from_signal_index, int to_signal
|
||||
delete connectionLists;
|
||||
throw;
|
||||
}
|
||||
+#endif // if 0
|
||||
#endif
|
||||
|
||||
locker.relock();
|
||||
104
qt-patches/015-win-all-getopenfilename thumbnails.patch
Normal file
104
qt-patches/015-win-all-getopenfilename thumbnails.patch
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp
|
||||
index d0b1ae6..a98a0d5 100644
|
||||
--- a/src/gui/dialogs/qfiledialog_win.cpp
|
||||
+++ b/src/gui/dialogs/qfiledialog_win.cpp
|
||||
@@ -201,6 +201,55 @@ static QByteArray aTitle;
|
||||
static QByteArray aFilter;
|
||||
// Use ANSI strings and API
|
||||
|
||||
+UINT_PTR CALLBACK ya_ofn_hook_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
+{
|
||||
+ Q_UNUSED(wParam);
|
||||
+ Q_UNUSED(lParam);
|
||||
+
|
||||
+ static const WPARAM SHVIEW_ICON = 0x7029;
|
||||
+ static const WPARAM SHVIEW_LIST = 0x702B;
|
||||
+ static const WPARAM SHVIEW_REPORT = 0x702C;
|
||||
+ static const WPARAM SHVIEW_THUMBNAIL = 0x702D;
|
||||
+ static const WPARAM SHVIEW_TILE = 0x702E;
|
||||
+
|
||||
+ static const WPARAM VISTA_TABLE = 0x704B;
|
||||
+ static const WPARAM VISTA_TILE = 0x704C;
|
||||
+ static const WPARAM VISTA_HUGE_ICONS = 0x704D;
|
||||
+ static const WPARAM VISTA_MEDIUM_ICONS = 0x704E;
|
||||
+ static const WPARAM VISTA_BIG_ICONS = 0x704F;
|
||||
+ static const WPARAM VISTA_SMALL_ICONS = 0x7050;
|
||||
+ static const WPARAM VISTA_LIST = 0x7051;
|
||||
+
|
||||
+ static bool bLvSetupDone = false;
|
||||
+ switch (uMsg) {
|
||||
+ case WM_INITDIALOG:
|
||||
+ bLvSetupDone = false;
|
||||
+ break;
|
||||
+ case WM_NOTIFY:
|
||||
+ if (!bLvSetupDone) {
|
||||
+ HWND hWndParent = GetParent(hwnd);
|
||||
+ HWND hwndLv;
|
||||
+ QT_WA({
|
||||
+ hwndLv = FindWindowExW(hWndParent, 0, L"SHELLDLL_DefView", 0);
|
||||
+ } , {
|
||||
+ hwndLv = FindWindowExA(hWndParent, 0, "SHELLDLL_DefView", 0);
|
||||
+ });
|
||||
+ if (hwndLv) {
|
||||
+ if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA)
|
||||
+ SendMessage(hwndLv, WM_COMMAND, VISTA_MEDIUM_ICONS, 0);
|
||||
+ else
|
||||
+ SendMessage(hwndLv, WM_COMMAND, SHVIEW_THUMBNAIL, 0);
|
||||
+ bLvSetupDone = true;
|
||||
+ }
|
||||
+ }
|
||||
+ break;
|
||||
+ default:
|
||||
+ ;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
// If you change this, then make sure you change qt_win_make_OFN (below) too
|
||||
static OPENFILENAMEA *qt_win_make_OFNA(QWidget *parent,
|
||||
const QString &initialSelection,
|
||||
@@ -251,7 +300,7 @@ static OPENFILENAMEA *qt_win_make_OFNA(QWidget *parent,
|
||||
ofn->nMaxFile = maxLen;
|
||||
ofn->lpstrInitialDir = aInitDir.data();
|
||||
ofn->lpstrTitle = aTitle.data();
|
||||
- ofn->Flags = (OFN_NOCHANGEDIR | OFN_HIDEREADONLY | OFN_EXPLORER);
|
||||
+ ofn->Flags = (OFN_NOCHANGEDIR | OFN_HIDEREADONLY | OFN_EXPLORER | OFN_ENABLEHOOK);
|
||||
|
||||
if (mode == QFileDialog::ExistingFile ||
|
||||
mode == QFileDialog::ExistingFiles)
|
||||
@@ -261,6 +310,10 @@ static OPENFILENAMEA *qt_win_make_OFNA(QWidget *parent,
|
||||
if (!(options & QFileDialog::DontConfirmOverwrite))
|
||||
ofn->Flags |= OFN_OVERWRITEPROMPT;
|
||||
|
||||
+ if (options & 0x8000) {
|
||||
+ ofn->lpfnHook = ya_ofn_hook_proc;
|
||||
+ }
|
||||
+
|
||||
return ofn;
|
||||
}
|
||||
|
||||
@@ -327,7 +380,7 @@ static OPENFILENAME* qt_win_make_OFN(QWidget *parent,
|
||||
ofn->nMaxFile = maxLen;
|
||||
ofn->lpstrInitialDir = (TCHAR *)tInitDir.utf16();
|
||||
ofn->lpstrTitle = (TCHAR *)tTitle.utf16();
|
||||
- ofn->Flags = (OFN_NOCHANGEDIR | OFN_HIDEREADONLY | OFN_EXPLORER);
|
||||
+ ofn->Flags = (OFN_NOCHANGEDIR | OFN_HIDEREADONLY | OFN_EXPLORER | OFN_ENABLEHOOK);
|
||||
if (mode == QFileDialog::ExistingFile ||
|
||||
mode == QFileDialog::ExistingFiles)
|
||||
ofn->Flags |= (OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST);
|
||||
@@ -336,10 +389,13 @@ static OPENFILENAME* qt_win_make_OFN(QWidget *parent,
|
||||
if (!(options & QFileDialog::DontConfirmOverwrite))
|
||||
ofn->Flags |= OFN_OVERWRITEPROMPT;
|
||||
|
||||
+ if (options & 0x8000) {
|
||||
+ ofn->lpfnHook = ya_ofn_hook_proc;
|
||||
+ }
|
||||
+
|
||||
return ofn;
|
||||
}
|
||||
|
||||
-
|
||||
static void qt_win_clean_up_OFN(OPENFILENAME **ofn)
|
||||
{
|
||||
delete [] (*ofn)->lpstrFile;
|
||||
14
qt-patches/016-win-4.5-all-appwindow windows.patch
Normal file
14
qt-patches/016-win-4.5-all-appwindow windows.patch
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
diff -urN qt-win-commercial-src-4.5.1.orig/src/gui/kernel/qwidget_win.cpp qt-win-commercial-src-4.5.1/src/gui/kernel/qwidget_win.cpp
|
||||
--- qt-win-commercial-src-4.5.1.orig/src/gui/kernel/qwidget_win.cpp 2009-04-22 02:01:56.000000000 +0400
|
||||
+++ qt-win-commercial-src-4.5.1/src/gui/kernel/qwidget_win.cpp 2009-04-29 19:15:38.000000000 +0400
|
||||
@@ -363,6 +363,10 @@
|
||||
} else {
|
||||
exsty |= WS_EX_TOOLWINDOW;
|
||||
}
|
||||
+
|
||||
+ if (q->property("is-appwindow").toBool()) {
|
||||
+ exsty |= WS_EX_APPWINDOW;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
129
qt-patches/017-all-all-QPointer improvements.patch
Normal file
129
qt-patches/017-all-all-QPointer improvements.patch
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
diff -urN qt-win-commercial-src-4.5.1.orig/src/corelib/kernel/qpointer.h qt-win-commercial-src-4.5.1/src/corelib/kernel/qpointer.h
|
||||
--- qt-win-commercial-src-4.5.1.orig/src/corelib/kernel/qpointer.h 2009-04-22 03:57:41.000000000 +0400
|
||||
+++ qt-win-commercial-src-4.5.1/src/corelib/kernel/qpointer.h 2009-05-22 17:41:17.000000000 +0400
|
||||
@@ -50,6 +50,18 @@
|
||||
|
||||
QT_MODULE(Core)
|
||||
|
||||
+#ifndef QT_NO_EXCEPTIONS
|
||||
+#include <stdexcept>
|
||||
+
|
||||
+class QPointerIsNull : public std::runtime_error {
|
||||
+public:
|
||||
+ QPointerIsNull()
|
||||
+ : std::runtime_error("QPointerIsNull")
|
||||
+ {
|
||||
+ }
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
template <class T>
|
||||
class QPointer
|
||||
{
|
||||
@@ -71,9 +83,19 @@
|
||||
{ return !o; }
|
||||
|
||||
inline T* operator->() const
|
||||
- { return static_cast<T*>(const_cast<QObject*>(o)); }
|
||||
+ {
|
||||
+#ifndef QT_NO_EXCEPTIONS
|
||||
+ if (isNull()) throw QPointerIsNull();
|
||||
+#endif
|
||||
+ return static_cast<T*>(const_cast<QObject*>(o));
|
||||
+ }
|
||||
inline T& operator*() const
|
||||
- { return *static_cast<T*>(const_cast<QObject*>(o)); }
|
||||
+ {
|
||||
+#ifndef QT_NO_EXCEPTIONS
|
||||
+ if (isNull()) throw QPointerIsNull();
|
||||
+#endif
|
||||
+ return *static_cast<T*>(const_cast<QObject*>(o));
|
||||
+ }
|
||||
inline operator T*() const
|
||||
{ return static_cast<T*>(const_cast<QObject*>(o)); }
|
||||
inline T* data() const
|
||||
@@ -85,70 +107,70 @@
|
||||
|
||||
template <class T>
|
||||
inline bool operator==(const T *o, const QPointer<T> &p)
|
||||
-{ return o == p.operator->(); }
|
||||
+{ return o == p.data(); }
|
||||
|
||||
template<class T>
|
||||
inline bool operator==(const QPointer<T> &p, const T *o)
|
||||
-{ return p.operator->() == o; }
|
||||
+{ return p.data() == o; }
|
||||
|
||||
#else
|
||||
|
||||
template<class T>
|
||||
inline bool operator==(const void *o, const QPointer<T> &p)
|
||||
-{ return o == p.operator->(); }
|
||||
+{ return o == p.data(); }
|
||||
|
||||
template<class T>
|
||||
inline bool operator==(const QPointer<T> &p, const void *o)
|
||||
-{ return p.operator->() == o; }
|
||||
+{ return p.data() == o; }
|
||||
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
inline bool operator==(T *o, const QPointer<T> &p)
|
||||
-{ return o == p.operator->(); }
|
||||
+{ return o == p.data(); }
|
||||
|
||||
template<class T>
|
||||
inline bool operator==(const QPointer<T> &p, T *o)
|
||||
-{ return p.operator->() == o; }
|
||||
+{ return p.data() == o; }
|
||||
|
||||
template<class T>
|
||||
inline bool operator==(const QPointer<T> &p1, const QPointer<T> &p2)
|
||||
-{ return p1.operator->() == p2.operator->(); }
|
||||
+{ return p1.data() == p2.data(); }
|
||||
|
||||
|
||||
#if (!defined(Q_CC_SUN) || (__SUNPRO_CC >= 0x580)) // ambiguity between const T * and T *
|
||||
|
||||
template <class T>
|
||||
inline bool operator!=(const T *o, const QPointer<T> &p)
|
||||
-{ return o != p.operator->(); }
|
||||
+{ return o != p.data(); }
|
||||
|
||||
template<class T>
|
||||
inline bool operator!= (const QPointer<T> &p, const T *o)
|
||||
-{ return p.operator->() != o; }
|
||||
+{ return p.data() != o; }
|
||||
|
||||
#else
|
||||
|
||||
template<class T>
|
||||
inline bool operator!= (const void *o, const QPointer<T> &p)
|
||||
-{ return o != p.operator->(); }
|
||||
+{ return o != p.data(); }
|
||||
|
||||
template<class T>
|
||||
inline bool operator!= (const QPointer<T> &p, const void *o)
|
||||
-{ return p.operator->() != o; }
|
||||
+{ return p.data() != o; }
|
||||
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
inline bool operator!=(T *o, const QPointer<T> &p)
|
||||
-{ return o != p.operator->(); }
|
||||
+{ return o != p.data(); }
|
||||
|
||||
template<class T>
|
||||
inline bool operator!= (const QPointer<T> &p, T *o)
|
||||
-{ return p.operator->() != o; }
|
||||
+{ return p.data() != o; }
|
||||
|
||||
template<class T>
|
||||
inline bool operator!= (const QPointer<T> &p1, const QPointer<T> &p2)
|
||||
-{ return p1.operator->() != p2.operator->() ; }
|
||||
+{ return p1.data() != p2.data() ; }
|
||||
|
||||
// Make MSVC < 1400 (2005) handle "if (NULL == p)" syntax
|
||||
#if defined(Q_CC_MSVC) && (_MSC_VER < 1400)
|
||||
12
qt-patches/018-win-all-disable CoUnitialize.patch
Normal file
12
qt-patches/018-win-all-disable CoUnitialize.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -urN qt-win-commercial-src-4.5.1.orig/src/activeqt/control/qaxservermain.cpp qt-win-commercial-src-4.5.1/src/activeqt/control/qaxservermain.cpp
|
||||
--- qt-win-commercial-src-4.5.1.orig/src/activeqt/control/qaxservermain.cpp 2009-04-22 02:01:56.000000000 +0400
|
||||
+++ qt-win-commercial-src-4.5.1/src/activeqt/control/qaxservermain.cpp 2009-06-25 15:40:34.000000000 +0400
|
||||
@@ -269,7 +269,7 @@
|
||||
nRet = ::main(argc, argv.data());
|
||||
QAxFactory::stopServer();
|
||||
qAxCleanup();
|
||||
- CoUninitialize();
|
||||
+// CoUninitialize();
|
||||
|
||||
}
|
||||
|
||||
15
qt-patches/019-win-all-build with multiple processes.patch
Normal file
15
qt-patches/019-win-all-build with multiple processes.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf
|
||||
index 373a36d..e34924f 100644
|
||||
--- a/mkspecs/win32-msvc2008/qmake.conf
|
||||
+++ b/mkspecs/win32-msvc2008/qmake.conf
|
||||
@@ -19,8 +19,8 @@ QMAKE_YACCFLAGS = -d
|
||||
QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t-
|
||||
QMAKE_CFLAGS_WARN_ON = -W3
|
||||
QMAKE_CFLAGS_WARN_OFF = -W0
|
||||
-QMAKE_CFLAGS_RELEASE = -O2 -MD
|
||||
-QMAKE_CFLAGS_DEBUG = -Zi -MDd
|
||||
+QMAKE_CFLAGS_RELEASE = -O2 -MT -MP
|
||||
+QMAKE_CFLAGS_DEBUG = -Zi -MDd -MP
|
||||
QMAKE_CFLAGS_YACC =
|
||||
QMAKE_CFLAGS_LTCG = -GL
|
||||
|
||||
60
qt-patches/020-all-all-prettify wavy underline.patch
Normal file
60
qt-patches/020-all-all-prettify wavy underline.patch
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
|
||||
index 263e53e..01af043 100644
|
||||
--- a/src/gui/painting/qpainter.cpp
|
||||
+++ b/src/gui/painting/qpainter.cpp
|
||||
@@ -6007,6 +6007,31 @@ static QPainterPath generateWavyPath(qreal minWidth, qreal maxRadius, QPaintDevi
|
||||
return path;
|
||||
}
|
||||
|
||||
+static QPixmap createTransparentPixmap(int width, int height)
|
||||
+{
|
||||
+ QPixmap pix(width, height);
|
||||
+ QBitmap mask(width, height);
|
||||
+ pix.fill();
|
||||
+ mask.clear();
|
||||
+ pix.setMask(mask);
|
||||
+ return pix;
|
||||
+}
|
||||
+
|
||||
+static QPixmap generateWavyPattern(QPainter* painter)
|
||||
+{
|
||||
+ static QPixmap pattern;
|
||||
+ if (pattern.isNull()) {
|
||||
+ pattern = createTransparentPixmap(4, 2);
|
||||
+ QPainter p2(&pattern);
|
||||
+ p2.setPen(painter->pen());
|
||||
+ p2.fillRect(pattern.rect(), Qt::transparent);
|
||||
+ p2.drawLine(0, 0, 0, 0);
|
||||
+ p2.drawLine(1, 1, 2, 1);
|
||||
+ p2.drawLine(3, 0, 4, 0);
|
||||
+ }
|
||||
+ return pattern;
|
||||
+}
|
||||
+
|
||||
static void drawTextItemDecoration(QPainter *painter, const QPointF &pos, const QTextItemInt &ti)
|
||||
{
|
||||
QTextCharFormat::UnderlineStyle underlineStyle = ti.underlineStyle;
|
||||
@@ -6035,16 +6060,19 @@ static void drawTextItemDecoration(QPainter *painter, const QPointF &pos, const
|
||||
|
||||
if (underlineStyle == QTextCharFormat::WaveUnderline) {
|
||||
painter->save();
|
||||
- painter->setRenderHint(QPainter::Antialiasing);
|
||||
+ // painter->setRenderHint(QPainter::Antialiasing);
|
||||
painter->translate(pos.x(), underlinePos);
|
||||
|
||||
QColor uc = ti.charFormat.underlineColor();
|
||||
if (uc.isValid())
|
||||
painter->setPen(uc);
|
||||
|
||||
- painter->drawPath(generateWavyPath(ti.width.toReal(),
|
||||
- fe->underlinePosition().toReal(),
|
||||
- painter->device()));
|
||||
+ QPixmap pattern = generateWavyPattern(painter);
|
||||
+ QRect underlineRect(0, 0, ti.width.toInt(), pattern.height());
|
||||
+ painter->drawTiledPixmap(underlineRect, pattern);
|
||||
+ // painter->drawPath(generateWavyPath(ti.width.toReal(),
|
||||
+ // fe->underlinePosition().toReal(),
|
||||
+ // painter->device()));
|
||||
painter->restore();
|
||||
} else if (underlineStyle != QTextCharFormat::NoUnderline) {
|
||||
QLineF underLine(line.x1(), underlinePos, line.x2(), underlinePos);
|
||||
57
qt-patches/patch-qt.rb
Normal file
57
qt-patches/patch-qt.rb
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
if Dir.pwd =~ /qt-(mac|x11|win|all)-(opensource|commercial)-src-(\d.\d.\d)/
|
||||
QT_OS = $1
|
||||
QT_VERSION = $3
|
||||
else
|
||||
if Dir.pwd =~ /qt/ # qt.git
|
||||
QT_OS = 'all'
|
||||
QT_VERSION = '4.5.0'
|
||||
else
|
||||
raise "You're supposed to run patch-qt.rb from Qt base directory."
|
||||
end
|
||||
end
|
||||
|
||||
def os_applicable(os)
|
||||
return true if os == "all"
|
||||
return true if QT_OS == "all"
|
||||
return true if os == QT_OS
|
||||
false
|
||||
end
|
||||
|
||||
def version_applicable(ver)
|
||||
return true if ver == "all"
|
||||
return true if ver == QT_VERSION
|
||||
return true if QT_VERSION[0, ver.length] == ver
|
||||
false
|
||||
end
|
||||
|
||||
def is_patch_applicable(file_name)
|
||||
if file_name =~ /^(\d+)-(all|win|x11|mac)-(all|\d\.\d(?:\.\d)?)-(.+)\.patch$/
|
||||
os = $2
|
||||
qt_ver = $3
|
||||
return os_applicable(os) && version_applicable(qt_ver)
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
$failed_patches = []
|
||||
|
||||
def apply_patch(file_name)
|
||||
puts "Applying #{file_name}"
|
||||
output = `cat "#{file_name}" | patch -p1`
|
||||
puts output
|
||||
$failed_patches += [file_name] if output =~ /FAILED/
|
||||
end
|
||||
|
||||
QT_PATCHES_DIR = File.dirname(__FILE__)
|
||||
patches = Dir.new(QT_PATCHES_DIR).entries.find_all { |e| e =~ /\.patch$/ }
|
||||
patches = patches.find_all { |e| is_patch_applicable(e) }
|
||||
patches.each { |e| apply_patch("#{QT_PATCHES_DIR}/#{e}") }
|
||||
|
||||
if !$failed_patches.empty?
|
||||
puts "\n\n*** Some patches were not applied ***"
|
||||
p $failed_patches
|
||||
end
|
||||
|
||||
Reference in a new issue