]> git.pld-linux.org Git - packages/qt4.git/blame - qt4-kde-git.patch
- rel 3; segfault fix
[packages/qt4.git] / qt4-kde-git.patch
CommitLineData
e356592b
AM
1diff --git a/README.kde-qt b/README.kde-qt
2new file mode 100644
3index 0000000..db3feb6
4--- /dev/null
5+++ b/README.kde-qt
6@@ -0,0 +1,201 @@
7+This is a patched version of Qt. It may include changes made by KDE
8+and Qt developers that have either not been accepted for inclusion
9+into Qt, or have been accepted for a later version of Qt than this
10+one.
11+
12+1. Configuring Qt
13+=================
14+
15+The recommended compile line is:
16+
17+--default-config-begin--
18+
19+ ./configure -qt-gif -debug -fast -no-separate-debug-info \
20+ -system-libpng -system-libjpeg -system-zlib \
21+ -dbus -webkit -plugin-sql-mysql \
22+ -nomake examples -nomake demos -prefix <installdir>
23+
24+--default-config-end--
25+
26+It contains "-debug", which greatly improves the use for backtraces (but
27+also needs a lot more disk space and makes things slower). To build in
28+release mode, replace it with "-release".
29+
30+It also contains "-no-separate-debug-info", which disables separate .debug
31+files. Instead, the debug information will be built into the libraries.
32+This option is needed when you install Qt.
33+
34+If you don't install Qt, it can be useful to disable this option,
35+thus having separate debug symbol files. With separate debug files, you can
36+just move those debug files to another directory to remove Qt debug symbols.
37+Moving the files back will enable Qt debug symbols again.
38+This is useful if you rarely need to step into Qt functions during debugging,
39+because GDB loads much faster and uses less memory without Qt debug symbols.
40+In the rare case you need to step into Qt code, you can temporarily enable
41+debug symbols again by moving the debug files back. You can even load the Qt
42+debug symbols from within GDB on demand, using the "symbol-file" command.
43+
44+If you are planning to compile Qt using an Icecream cluster you have to
45+pass the option -no-pch (no precompiled headers) to configure to make
46+distributed compilation work.
47+
48+2. Compiling Qt
49+===============
50+
51+To compile Qt on a Unix platform, run:
52+
53+ export MAKEFLAGS=-j2
54+ make
55+ make install
56+
57+If your computer has more than one core or processor, you may consider
58+increasing the "2" above. If you've got a compile farm available, you
59+should adjust the -j argument to match the number of slots in that
60+farm.
61+
62+3. Modifying & rebuilding Qt
63+============================
64+
65+If you make modifications to the Qt source code, you don't need to
66+build everything again. Simply go to the directory containing the
67+Makefile closest to the files you changed and run "make" again.
68+
69+For example, if you've modified src/corelib/io/qiodevice.cpp, do:
70+
71+ cd src/corelib
72+ make
73+
74+If you make a change that is not temporary, you should create a Git
75+commit out of it. However, you shouldn't push those changes to
76+kde-qt.git. If you have a fix that benefit others, see the "Creating
77+kde-qt.git modifications" section below.
78+
79+4. Building Qt examples and demos
80+=================================
81+
82+The "-nomake examples -nomake demos" arguments to the configure script
83+mean that those two sections will not be configured for building,
84+which is unneeded for usage of the library. If you want to compile
85+the examples or demos later, just enter either directory and type:
86+
87+ qmake
88+ make
89+
90+5. Build Qt tests
91+=================
92+
93+(Official information: http://qt.gitorious.org/qt/pages/QtAutotestsEnvironment)
94+
95+In order to run Qt tests, you must have a "developer build" of Qt. For
96+that, you need to reconfigure Qt and add the "-developer-build"
97+option. That option is technically equivalent to the options:
98+
99+ -debug -prefix $PWD -DQT_BUILD_INTERNAL
100+
101+To run a test, go to its source dir in tests/auto/testname. Type
102+"make" to build it, then run it (either ./tst_testname, or "make install").
103+
104+6. Building Qt documentation
105+============================
106+
107+To build and install the documentation, run:
108+
109+ make docs
110+ ./config.status
111+ make install
112+
113+It is necessary to do this once only, even if you rebuild Qt later.
114+
115+7. Using Qt uninstalled
116+=======================
117+
118+To use without having to install it, configure it as follows:
119+
120+ ./configure <other configure options> -prefix $PWD
121+ make sub-src
122+ make sub-tools
123+
124+Attention: DO NOT run
125+
126+ make install
127+
128+If you do, Qt will overwrite your include/ directory with its
129+installation.
130+
131+8. Creating kde-qt.git modifications
132+====================================
133+
134+If you have fixed a bug in Qt or modified it in any way that may
135+benefit others, please share your change in the form of a patch. Do
136+not commit your changes directly to the main branch because they
137+may be lost in a future update if they have not been added to the
138+official Qt release.
139+
140+The exception to the above rule is that if the fix has been accepted
141+by Qt Software (and so will appear in the very next release of Qt),
142+then it should be simply cherry-picked from the Qt development
143+branch. Note that you shouldn't do this for changes that have been
144+accepted into a release which is not the very next.
145+In this case, you should use the following command:
146+
147+ git cherry-pick -x SHA1_OF_THE_FIX
148+where SHA1_OF_THE_FIX is the SHA-1 of the commit that you want to
149+introduce. Then push the change to the server.
150+
151+Before creating a patch, it is recommended to contact Qt Software
152+support via qt-bugs@trolltech.com and explain the situation. There may
153+be a solution for the problem already or a new direction that should
154+be accounted for.
155+
156+To create a patch, do the following:
157+ a) look at the listing of branches in
158+ http://qt.gitorious.org/+kde-developers/qt/kde-qt/commits/HEAD and
159+ select the next number.
160+
161+ b) create a new branch out of a clean, released version of Qt, (for
162+ example, 4.5.1), using the number above and a brief description of
163+ your fix. For example:
164+ git checkout -b patches/0180-window-role v4.5.1
165+ You can see the available released versions of Qt with:
166+ git tag
167+
168+ c) make your changes to the Qt source code and verify that it
169+ compiles, links and works (please run the respective unit tests).
170+
171+ c) commit your changes to Git, using the "git commit" command. Please
172+ see http://qt.gitorious.org/qt/pages/GitIntroductionWithQt and
173+ http://qt.gitorious.org/qt/pages/QtCodingStyle for information on
174+ how to create commits
175+ Note that you can create multiple commits.
176+
177+ e) merge the change to the main branch, for example, 4.5.1-patched:
178+ git checkout 4.5.1-patched
179+ git merge patches/0180-window-role
180+
181+ f) push the changes you made to your branch and to the main server:
182+ git push git@gitorious.org:qt/kde-qt.git 4.5.1-patched patches/0180-window-role
183+ (Don't forget to list both branch names)
184+
185+Don't forget to submit your patch to using the Qt Contribution Model,
186+along with the long description of the issue found. See
187+http://qt.gitorious.org/qt/pages/QtContributionGuidelines for
188+information how. You can submit the branch you've just sent to the
189+server.
190+
191+9. Troubleshooting: Re-configuring and re-compiling
192+==================================================
193+
194+For those updating the source in a directory where Qt has already
195+been compiled, you may need to run the following commands from the
196+top directory of your Qt sources:
197+
198+ find . -name '*.moc' | xargs rm
199+
200+Sometimes ./configure will refuse to run. You may need to:
201+ rm .qmake.cache
202+
203+If you think you may have run "make install" on an install-less Qt
204+(srcdir == $QTDIR), run:
205+
206+ rm -rf include
207+ bin/syncqt
208diff --git a/bin/syncqt b/bin/syncqt
c57a122a 209index a14a82d..ac140eb 100755
e356592b
AM
210--- a/bin/syncqt
211+++ b/bin/syncqt
c57a122a 212@@ -366,9 +366,13 @@ sub fixPaths {
e356592b
AM
213 $match_dir = $tmp;
214 $i = $slash;
215 }
216+ my $cnt_ofs = 0;
217+ if($match_dir =~ /^[a-zA-Z]:$/) {
218+ $cnt_ofs = 1;
219+ }
220 if($match_dir) {
221 my $after = substr($dir, length($match_dir));
222- my $count = ($after =~ tr,/,,);
223+ my $count = ($after =~ tr,/,,) - $cnt_ofs;
224 my $dots = "";
225 for(my $i = 0; $i < $count; $i++) {
226 $dots .= "../";
227diff --git a/configure b/configure
c57a122a 228index 146ba82..7be8f7c 100755
e356592b
AM
229--- a/configure
230+++ b/configure
c57a122a 231@@ -1012,6 +1012,11 @@ while [ "$#" -gt 0 ]; do
e356592b
AM
232 VAL=`echo $1 | sed 's,-D,,'`
233 fi
234 ;;
235+ -isystem)
236+ VAR="add_isystempath"
237+ shift
238+ VAL="$1"
239+ ;;
240 -I?*|-I)
241 VAR="add_ipath"
242 if [ "$1" = "-I" ]; then
c57a122a 243@@ -2020,6 +2025,9 @@ while [ "$#" -gt 0 ]; do
e356592b
AM
244 add_ipath)
245 I_FLAGS="$I_FLAGS -I\"${VAL}\""
246 ;;
247+ add_isystempath)
248+ I_FLAGS="$I_FLAGS -isystem \"${VAL}\""
249+ ;;
250 add_lpath)
251 L_FLAGS="$L_FLAGS -L\"${VAL}\""
252 ;;
253diff --git a/projects.pro b/projects.pro
c57a122a 254index aa1eb71..8ae64c2 100644
e356592b
AM
255--- a/projects.pro
256+++ b/projects.pro
c57a122a 257@@ -149,6 +149,9 @@ unix {
e356592b
AM
258 DEFAULT_QMAKESPEC ~= s,^.*mkspecs/,,g
259 mkspecs.commands += $(DEL_FILE) $(INSTALL_ROOT)$$mkspecs.path/default; $(SYMLINK) $$DEFAULT_QMAKESPEC $(INSTALL_ROOT)$$mkspecs.path/default
260 }
261+win32 {
262+ mkspecs.files += $$QT_BUILD_TREE/mkspecs/default
263+}
264 INSTALLS += mkspecs
265
266 false:macx { #mac install location
267diff --git a/qmake/property.cpp b/qmake/property.cpp
268index ea4842a..ac54854 100644
269--- a/qmake/property.cpp
270+++ b/qmake/property.cpp
271@@ -81,29 +81,32 @@ QMakeProperty::keyBase(bool version) const
272 QString
273 QMakeProperty::value(QString v, bool just_check)
274 {
275+ QString ret;
276 if(v == "QT_INSTALL_PREFIX")
277- return QLibraryInfo::location(QLibraryInfo::PrefixPath);
278+ ret = QLibraryInfo::location(QLibraryInfo::PrefixPath);
279 else if(v == "QT_INSTALL_DATA")
280- return QLibraryInfo::location(QLibraryInfo::DataPath);
281+ ret = QLibraryInfo::location(QLibraryInfo::DataPath);
282 else if(v == "QT_INSTALL_DOCS")
283- return QLibraryInfo::location(QLibraryInfo::DocumentationPath);
284+ ret = QLibraryInfo::location(QLibraryInfo::DocumentationPath);
285 else if(v == "QT_INSTALL_HEADERS")
286- return QLibraryInfo::location(QLibraryInfo::HeadersPath);
287+ ret = QLibraryInfo::location(QLibraryInfo::HeadersPath);
288 else if(v == "QT_INSTALL_LIBS")
289- return QLibraryInfo::location(QLibraryInfo::LibrariesPath);
290+ ret = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
291 else if(v == "QT_INSTALL_BINS")
292- return QLibraryInfo::location(QLibraryInfo::BinariesPath);
293+ ret = QLibraryInfo::location(QLibraryInfo::BinariesPath);
294 else if(v == "QT_INSTALL_PLUGINS")
295- return QLibraryInfo::location(QLibraryInfo::PluginsPath);
296+ ret = QLibraryInfo::location(QLibraryInfo::PluginsPath);
297 else if(v == "QT_INSTALL_TRANSLATIONS")
298- return QLibraryInfo::location(QLibraryInfo::TranslationsPath);
299+ ret = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
300 else if(v == "QT_INSTALL_CONFIGURATION")
301- return QLibraryInfo::location(QLibraryInfo::SettingsPath);
302+ ret = QLibraryInfo::location(QLibraryInfo::SettingsPath);
303 else if(v == "QT_INSTALL_EXAMPLES")
304- return QLibraryInfo::location(QLibraryInfo::ExamplesPath);
305+ ret = QLibraryInfo::location(QLibraryInfo::ExamplesPath);
306 else if(v == "QT_INSTALL_DEMOS")
307- return QLibraryInfo::location(QLibraryInfo::DemosPath);
308- else if(v == "QMAKE_MKSPECS")
309+ ret = QLibraryInfo::location(QLibraryInfo::DemosPath);
310+ if(!ret.isEmpty())
311+ return QDir::toNativeSeparators(ret);
312+ if(v == "QMAKE_MKSPECS")
313 return qmake_mkspec_paths().join(Option::target_mode == Option::TARG_WIN_MODE ? ";" : ":");
314 else if(v == "QMAKE_VERSION")
315 return qmake_version();
316@@ -116,7 +119,7 @@ QMakeProperty::value(QString v, bool just_check)
317 int slash = v.lastIndexOf('/');
318 QVariant var = settings->value(keyBase(slash == -1) + v);
319 bool ok = var.isValid();
320- QString ret = var.toString();
321+ ret = var.toString();
322 if(!ok) {
323 QString version = qmake_version();
324 if(slash != -1) {
e356592b 325diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
c57a122a 326index 9614e7a..58493a5 100644
e356592b
AM
327--- a/src/corelib/kernel/qobject.cpp
328+++ b/src/corelib/kernel/qobject.cpp
c57a122a 329@@ -1136,8 +1136,16 @@ void QObject::setObjectName(const QString &name)
e356592b
AM
330 {
331 Q_D(QObject);
332 d->objectName = name;
333+#if defined(Q_WS_X11)
334+ d->checkWindowRole();
335+#endif
336 }
337
338+#if defined(Q_WS_X11)
339+void QObjectPrivate::checkWindowRole()
340+{
341+}
342+#endif
343
344 #ifdef QT3_SUPPORT
345 /*! \internal
346diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
c57a122a 347index e75f24e..1294fa4 100644
e356592b
AM
348--- a/src/corelib/kernel/qobject_p.h
349+++ b/src/corelib/kernel/qobject_p.h
c57a122a 350@@ -83,7 +83,9 @@ void Q_CORE_EXPORT qt_register_signal_spy_callbacks(const QSignalSpyCallbackSet
e356592b 351
c57a122a 352 extern QSignalSpyCallbackSet Q_CORE_EXPORT qt_signal_spy_callback_set;
e356592b
AM
353
354-enum { QObjectPrivateVersion = QT_VERSION };
355+// add 0x1000000 to mark it as qt-copy version, with possible modifications
356+// in some Q*Private class
357+enum { QObjectPrivateVersion = QT_VERSION + 0x1000000 };
358
c57a122a 359 class Q_CORE_EXPORT QDeclarativeData
e356592b 360 {
c57a122a
AM
361@@ -157,6 +159,9 @@ public:
362 void sendPendingChildInsertedEvents();
363 void removePendingChildInsertedEvents(QObject *child);
364 #endif
e356592b
AM
365+#if defined(Q_WS_X11)
366+ virtual void checkWindowRole();
367+#endif
368
c57a122a
AM
369 static Sender *setCurrentSender(QObject *receiver,
370 Sender *sender);
e356592b 371diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
c57a122a 372index 528d512..edbe75b 100644
e356592b
AM
373--- a/src/gui/kernel/qkeysequence.cpp
374+++ b/src/gui/kernel/qkeysequence.cpp
c57a122a 375@@ -1139,10 +1139,10 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
e356592b
AM
376
377 QList<QModifKeyName> modifs;
378 if (nativeText) {
379- modifs << QModifKeyName(Qt::CTRL, QShortcut::tr("Ctrl").toLower().append(QLatin1Char('+')))
380- << QModifKeyName(Qt::SHIFT, QShortcut::tr("Shift").toLower().append(QLatin1Char('+')))
381- << QModifKeyName(Qt::ALT, QShortcut::tr("Alt").toLower().append(QLatin1Char('+')))
382- << QModifKeyName(Qt::META, QShortcut::tr("Meta").toLower().append(QLatin1Char('+')));
383+ modifs << QModifKeyName(Qt::CTRL, QShortcut::tr("Ctrl", "Ctrl key, used for shortcuts").toLower().append(QLatin1Char('+')))
384+ << QModifKeyName(Qt::SHIFT, QShortcut::tr("Shift", "Shift key, used for shortcuts").toLower().append(QLatin1Char('+')))
385+ << QModifKeyName(Qt::ALT, QShortcut::tr("Alt", "Alt key, used for shortcuts").toLower().append(QLatin1Char('+')))
386+ << QModifKeyName(Qt::META, QShortcut::tr("Meta", "Meta key, used for shortcuts").toLower().append(QLatin1Char('+')));
387 }
388 modifs += *gmodifs; // Test non-translated ones last
389
c57a122a 390@@ -1232,7 +1232,7 @@ QString QKeySequence::encodeString(int key)
e356592b
AM
391 static inline void addKey(QString &str, const QString &theKey, QKeySequence::SequenceFormat format)
392 {
393 if (!str.isEmpty())
394- str += (format == QKeySequence::NativeText) ? QShortcut::tr("+")
395+ str += (format == QKeySequence::NativeText) ? QShortcut::tr("+", "Symbol used to concatenate keys in shortcuts")
396 : QString::fromLatin1("+");
397 str += theKey;
398 }
c57a122a 399@@ -1272,13 +1272,13 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
e356592b
AM
400 {
401 // On other systems the order is Meta, Control, Alt, Shift
402 if ((key & Qt::META) == Qt::META)
403- s = nativeText ? QShortcut::tr("Meta") : QString::fromLatin1("Meta");
404+ s = nativeText ? QShortcut::tr("Meta", "Meta key, used for shortcuts") : QString::fromLatin1("Meta");
405 if ((key & Qt::CTRL) == Qt::CTRL)
406- addKey(s, nativeText ? QShortcut::tr("Ctrl") : QString::fromLatin1("Ctrl"), format);
407+ addKey(s, nativeText ? QShortcut::tr("Ctrl", "Ctrl key, used for shortcuts") : QString::fromLatin1("Ctrl"), format);
408 if ((key & Qt::ALT) == Qt::ALT)
409- addKey(s, nativeText ? QShortcut::tr("Alt") : QString::fromLatin1("Alt"), format);
410+ addKey(s, nativeText ? QShortcut::tr("Alt", "Alt key, used for shortcuts") : QString::fromLatin1("Alt"), format);
411 if ((key & Qt::SHIFT) == Qt::SHIFT)
412- addKey(s, nativeText ? QShortcut::tr("Shift") : QString::fromLatin1("Shift"), format);
413+ addKey(s, nativeText ? QShortcut::tr("Shift", "Shift key, used for shortcuts") : QString::fromLatin1("Shift"), format);
414 }
415
416
c57a122a 417@@ -1293,7 +1293,7 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
e356592b
AM
418 p += QChar((key-0x10000)%400+0xdc00);
419 }
420 } else if (key >= Qt::Key_F1 && key <= Qt::Key_F35) {
421- p = nativeText ? QShortcut::tr("F%1").arg(key - Qt::Key_F1 + 1)
422+ p = nativeText ? QShortcut::tr("F%1", "Fx key, used for shortcuts").arg(key - Qt::Key_F1 + 1)
423 : QString::fromLatin1("F%1").arg(key - Qt::Key_F1 + 1);
424 } else if (key) {
425 int i=0;
426diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
c57a122a 427index 7832393..18c331a 100644
e356592b
AM
428--- a/src/gui/kernel/qwidget_p.h
429+++ b/src/gui/kernel/qwidget_p.h
c57a122a
AM
430@@ -661,6 +661,7 @@ public:
431 static QWidget *keyboardGrabber;
e356592b 432
e356592b
AM
433 void setWindowRole();
434+ virtual void checkWindowRole();
435 void sendStartupMessage(const char *message) const;
436 void setNetWmWindowTypes();
437 void x11UpdateIsOpaque();
438diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
c57a122a 439index 3135ece..5c997a4 100644
e356592b
AM
440--- a/src/gui/kernel/qwidget_x11.cpp
441+++ b/src/gui/kernel/qwidget_x11.cpp
c57a122a 442@@ -763,6 +763,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
e356592b
AM
443 Q_ASSERT(id);
444 XChangeWindowAttributes(dpy, id, CWOverrideRedirect | CWSaveUnder,
445 &wsa);
446+ XClassHint class_hint;
447+ QByteArray appName = qAppName().toLatin1();
448+ class_hint.res_name = appName.data(); // application name
449+ class_hint.res_class = const_cast<char *>(QX11Info::appClass()); // application class
450+ XSetWMProperties(dpy, id, 0, 0, 0, 0, 0, 0, &class_hint);
451 } else if (topLevel && !desktop) { // top-level widget
452 if (!X11->wm_client_leader)
453 create_wm_client_leader();
c57a122a 454@@ -816,32 +821,40 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
e356592b
AM
455 // set EWMH window types
456 setNetWmWindowTypes();
457
458+ // when we create a toplevel widget, the frame strut should be dirty
459+ data.fstrut_dirty = 1;
460+
461+ } else {
462+ // non-toplevel widgets don't have a frame, so no need to
463+ // update the strut
464+ data.fstrut_dirty = 0;
465+ }
466+
467+ if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows
468 // set _NET_WM_PID
469 long curr_pid = getpid();
470 XChangeProperty(dpy, id, ATOM(_NET_WM_PID), XA_CARDINAL, 32, PropModeReplace,
471 (unsigned char *) &curr_pid, 1);
472
473- // when we create a toplevel widget, the frame strut should be dirty
474- data.fstrut_dirty = 1;
475
476 // declare the widget's window role
477+ QByteArray windowRole;
478 if (QTLWExtra *topData = maybeTopData()) {
479- if (!topData->role.isEmpty()) {
480- QByteArray windowRole = topData->role.toUtf8();
481- XChangeProperty(dpy, id,
482- ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace,
483- (unsigned char *)windowRole.constData(), windowRole.length());
484- }
485+ if (!topData->role.isEmpty())
486+ windowRole = topData->role.toUtf8();
487+ }
488+ if (windowRole.isEmpty()) // use object name as a fallback
489+ windowRole = objectName.toUtf8();
490+ if (!windowRole.isEmpty()) {
491+ XChangeProperty(dpy, id,
492+ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace,
493+ (unsigned char *)windowRole.constData(), windowRole.length());
494 }
495
496 // set client leader property
497 XChangeProperty(dpy, id, ATOM(WM_CLIENT_LEADER),
498 XA_WINDOW, 32, PropModeReplace,
499 (unsigned char *)&X11->wm_client_leader, 1);
500- } else {
501- // non-toplevel widgets don't have a frame, so no need to
502- // update the strut
503- data.fstrut_dirty = 0;
504 }
505
506 if (initializeWindow && q->internalWinId()) {
c57a122a 507@@ -2919,6 +2932,17 @@ void QWidgetPrivate::setWindowRole()
e356592b
AM
508 (unsigned char *)windowRole.constData(), windowRole.length());
509 }
510
511+void QWidgetPrivate::checkWindowRole()
512+{
513+ Q_Q(QWidget);
514+ if( !q->windowRole().isEmpty() || !q->internalWinId())
515+ return;
516+ QByteArray windowRole = objectName.toUtf8(); // use as a fallback
517+ XChangeProperty(X11->display, q->internalWinId(),
518+ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace,
519+ (unsigned char *)windowRole.constData(), windowRole.length());
520+}
521+
522 Q_GLOBAL_STATIC(QX11PaintEngine, qt_widget_paintengine)
523 QPaintEngine *QWidget::paintEngine() const
524 {
e356592b 525diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
c57a122a 526index 30f6144..36dfe6d 100644
e356592b
AM
527--- a/src/gui/widgets/qtabbar.cpp
528+++ b/src/gui/widgets/qtabbar.cpp
c57a122a 529@@ -678,8 +678,8 @@ void QTabBarPrivate::refresh()
e356592b
AM
530 layoutTabs();
531 makeVisible(currentIndex);
532 q->update();
533- q->updateGeometry();
534 }
535+ q->updateGeometry();
536 }
537
538 /*!
539diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp
c57a122a 540index 8e033b7..b5b2edd 100644
e356592b
AM
541--- a/src/tools/moc/main.cpp
542+++ b/src/tools/moc/main.cpp
543@@ -94,7 +94,13 @@ static QByteArray combinePath(const char *infile, const char *outfile)
544 inSplitted.prepend(QLatin1String(".."));
545 }
546 inSplitted.append(inFileInfo.fileName());
547+#ifdef Q_WS_WIN
548+ const QString rel = inSplitted.join(QLatin1String("/"));
549+ const QString abs = inFileInfo.absoluteFilePath();
550+ return QFile::encodeName(rel.length() < abs.length() ? rel : abs);
551+#else
552 return QFile::encodeName(inSplitted.join(QLatin1String("/")));
553+#endif
554 }
555
556
This page took 0.084056 seconds and 4 git commands to generate.