fix lupdate segfault (#486866)
This commit is contained in:
parent
edf6f3a83a
commit
015ea98437
|
@ -0,0 +1,41 @@
|
||||||
|
diff -up qt-x11-opensource-src-4.5.0/tools/linguist/shared/profileevaluator.cpp.orig qt-x11-opensource-src-4.5.0/tools/linguist/shared/profileevaluator.cpp
|
||||||
|
--- qt-x11-opensource-src-4.5.0/tools/linguist/shared/profileevaluator.cpp.orig 2009-03-16 12:50:03.000000000 +0100
|
||||||
|
+++ qt-x11-opensource-src-4.5.0/tools/linguist/shared/profileevaluator.cpp 2009-03-17 00:42:51.000000000 +0100
|
||||||
|
@@ -86,6 +86,7 @@ public:
|
||||||
|
void enterScope(bool multiLine);
|
||||||
|
void leaveScope();
|
||||||
|
void finalizeBlock();
|
||||||
|
+ void cleanup();
|
||||||
|
|
||||||
|
// implementation of AbstractProItemVisitor
|
||||||
|
bool visitBeginProBlock(ProBlock *block);
|
||||||
|
@@ -164,6 +165,15 @@ ProFileEvaluator::Private::Private(ProFi
|
||||||
|
m_contNextLine = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
+void ProFileEvaluator::Private::cleanup()
|
||||||
|
+{
|
||||||
|
+ m_commentItem = 0;
|
||||||
|
+ m_block = 0;
|
||||||
|
+ m_proitem.clear();
|
||||||
|
+ m_blockstack.clear();
|
||||||
|
+ m_pendingComment.clear();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
bool ProFileEvaluator::Private::read(ProFile *pro)
|
||||||
|
{
|
||||||
|
QFile file(pro->fileName());
|
||||||
|
@@ -180,11 +190,14 @@ bool ProFileEvaluator::Private::read(Pro
|
||||||
|
while (!ts.atEnd()) {
|
||||||
|
QString line = ts.readLine();
|
||||||
|
if (!parseLine(line)) {
|
||||||
|
+ cleanup();
|
||||||
|
q->errorMessage(format(".pro parse failure."));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
++m_lineNo;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ cleanup();
|
||||||
|
return true;
|
||||||
|
}
|
8
qt.spec
8
qt.spec
|
@ -12,7 +12,7 @@ Epoch: 1
|
||||||
Name: qt4
|
Name: qt4
|
||||||
%endif
|
%endif
|
||||||
Version: 4.5.0
|
Version: 4.5.0
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
|
|
||||||
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
|
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
|
||||||
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
||||||
|
@ -38,6 +38,8 @@ Patch2: qt-x11-opensource-src-4.2.2-multilib-optflags.patch
|
||||||
Patch3: qt-x11-opensource-src-4.2.2-multilib-QMAKEPATH.patch
|
Patch3: qt-x11-opensource-src-4.2.2-multilib-QMAKEPATH.patch
|
||||||
Patch5: qt-all-opensource-src-4.4.0-rc1-as_IN-437440.patch
|
Patch5: qt-all-opensource-src-4.4.0-rc1-as_IN-437440.patch
|
||||||
Patch10: qt-x11-opensource-src-4.5.0-rc1-ppc64.patch
|
Patch10: qt-x11-opensource-src-4.5.0-rc1-ppc64.patch
|
||||||
|
Patch11: qt-x11-opensource-src-4.5.0-linguist-crash.patch
|
||||||
|
|
||||||
## upstreamable bits
|
## upstreamable bits
|
||||||
# http://bugzilla.redhat.com/485677
|
# http://bugzilla.redhat.com/485677
|
||||||
Patch50: qt-x11-opensource-src-4.5.0-rc1-qhostaddress.patch
|
Patch50: qt-x11-opensource-src-4.5.0-rc1-qhostaddress.patch
|
||||||
|
@ -306,6 +308,7 @@ test -x apply_patches && ./apply_patches
|
||||||
%endif
|
%endif
|
||||||
%patch5 -p1 -b .bz#437440-as_IN-437440
|
%patch5 -p1 -b .bz#437440-as_IN-437440
|
||||||
%patch10 -p1 -b .ppc64
|
%patch10 -p1 -b .ppc64
|
||||||
|
%patch11 -p1 -b .linguist-crash
|
||||||
%patch50 -p1 -b .qhostaddress
|
%patch50 -p1 -b .qhostaddress
|
||||||
%patch51 -p1 -b .qdoc3
|
%patch51 -p1 -b .qdoc3
|
||||||
%patch52 -p1 -b .sparc64
|
%patch52 -p1 -b .sparc64
|
||||||
|
@ -779,6 +782,9 @@ gtk-update-icon-cache -q %{_datadir}/icons/hicolor 2> /dev/null ||:
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 17 2009 Than Ngo <than@redhat.com> - 4.5.0-6
|
||||||
|
- fix lupdate segfault (#486866)
|
||||||
|
|
||||||
* Sat Mar 14 2009 Dennis Gilmore <dennis@ausil.us> - 4.5.0-5
|
* Sat Mar 14 2009 Dennis Gilmore <dennis@ausil.us> - 4.5.0-5
|
||||||
- add patch for sparc64.
|
- add patch for sparc64.
|
||||||
- _Atomic_word is not always an int
|
- _Atomic_word is not always an int
|
||||||
|
|
Loading…
Reference in New Issue