Patch for qapplication_win.cpp
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Mon Jan 26 18:07:18 CET 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello
I've attached a patch for qapplication_win.cpp which implements
qAppFileName() so that qmake doesn't segfault any more:
make[4]: Leaving directory `/home/mandy/qt-3/tools/designer/uilib'
cd designer && make -f Makefile
make[4]: Entering directory `/home/mandy/qt-3/tools/designer/designer'
/home/mandy/qt-3/bin/uic -L /home/mandy/qt-3/plugins listboxeditor.ui
- -o listboxeditor.h
qapplication_win.cpp: qt_init
qapplication_win.cpp: qt_init_internal
make[4]: *** [listboxeditor.h] Segmentation fault (core dumped)
make[4]: Leaving directory `/home/mandy/qt-3/tools/designer/designer'
make[3]: *** [sub-designer] Error 2
make[3]: Leaving directory `/home/mandy/qt-3/tools/designer'
make[2]: *** [sub-designer] Error 2
make[2]: Leaving directory `/home/mandy/qt-3/tools'
make[1]: *** [sub-tools] Error 2
make[1]: Leaving directory `/home/mandy/qt-3'
make: *** [init] Error 2
I've reported this bug but nobody reacts on my mail so I did the
debugging on my own :-)
The patch is just a ugly hack to get qmake working. I think this
shouldn't go into the cvs whitout a change...
Maybe the appFileName should be stored somewhere in a static variable
so we don't need to call GetModuleFileName more than once within the
qApp. But this depends on how often qAppFileName() is called ...
Christian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFAFUlGnNKwkgf+zVMRAsMdAJ97otVTqnOY0/YW7QR//MPN4AdjSQCfUV1+
57R1rzBkIvWRIueG/m298QI=
=dBIa
-----END PGP SIGNATURE-----
-------------- next part --------------
Index: src/kernel/qapplication_win.cpp
===================================================================
RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qapplication_win.cpp,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 qapplication_win.cpp
--- src/kernel/qapplication_win.cpp 6 Nov 2003 04:48:20 -0000 1.1.2.7
+++ src/kernel/qapplication_win.cpp 26 Jan 2004 16:57:51 -0000
@@ -367,9 +367,13 @@ static bool qt_deferred_map_contains( QW
}
-Q_EXPORT QString qAppFileName()
+Q_EXPORT QString& qAppFileName()
{
- return "qAppFileName";
+ char appFileName[MAX_PATH];
+ QString tmp;
+ GetModuleFileName( 0, appFileName, MAX_PATH );
+ tmp = appFileName;
+ return tmp;
}
class QETWidget : public QWidget // event translator widget
More information about the kde-cygwin
mailing list