[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#586166: libqt4-dev: moc autoinclude fix ignore dot in directories

Package: libqt4-dev
Version: 4:4.6.2-4
Severity: normal
Tags: patch

*** Please type your report below this line ***

A period in the path of a file given to the moc generator should not
be used to determine if it is a header file or a source file,
currently it can. This causes problem with build generators like cmake
that use absolute paths and projects that use extension-less header
files, because if there is a period anyplace in the path it will fail.
This is a problem because directories outside of the source repository
can influence the build, even though it might be working on another
system or mysteriously fail after the source was moved.

See the bug report for more details.


It has been merged upstream, and here is the commit entry in the 4.6
qt git tree.

and a copy of the patch.

--- src/tools/moc/main.cpp.orig	2010-05-13 19:29:29.645663823 -0500
+++ src/tools/moc/main.cpp	2010-05-13 19:30:37.950162304 -0500
@@ -359,11 +359,9 @@ int runMoc(int _argc, char **_argv)
     if (autoInclude) {
+        int spos = filename.lastIndexOf(QDir::separator().toLatin1());
         int ppos = filename.lastIndexOf('.');
-        moc.noInclude = (ppos >= 0
-                         && tolower(filename[ppos + 1]) != 'h'
-                         && tolower(filename[ppos + 1]) != QDir::separator().toLatin1()
-                        );
+        moc.noInclude = ppos > spos && ppos >= 0 && tolower(filename[ppos + 1]) != 'h';
     if (moc.includeFiles.isEmpty()) {
         if (moc.includePath.isEmpty()) {

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.35-rc1+ (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages libqt4-dev depends on:
ii  libc6                   2.10.2-9         Embedded GNU C Library: Shared lib
ii  libgcc1                 1:4.4.4-1        GCC support library
ii  libqt4-assistant        4:4.6.2-4        Qt 4 assistant module
ii  libqt4-dbus             4:4.6.2-4        Qt 4 D-Bus module
ii  libqt4-designer         4:4.6.2-4        Qt 4 designer module
ii  libqt4-help             4:4.6.2-4        Qt 4 help module
ii  libqt4-multimedia       4:4.6.2-4        Qt 4 Multimedia module
ii  libqt4-network          4:4.6.2-4        Qt 4 network module
ii  libqt4-qt3support       4:4.6.2-4        Qt 3 compatibility library for Qt 
ii  libqt4-script           4:4.6.2-4        Qt 4 script module
ii  libqt4-scripttools      4:4.6.2-4        Qt 4 script tools module
ii  libqt4-sql              4:4.6.2-4        Qt 4 SQL module
ii  libqt4-svg              4:4.6.2-4        Qt 4 SVG module
ii  libqt4-test             4:4.6.2-4        Qt 4 test module
ii  libqt4-webkit           4:4.6.2-4        Qt 4 WebKit module
ii  libqt4-xml              4:4.6.2-4        Qt 4 XML module
ii  libqt4-xmlpatterns      4:4.6.2-4        Qt 4 XML patterns module
ii  libqtcore4              4:4.6.2-4        Qt 4 core module
ii  libqtgui4               4:4.6.2-4        Qt 4 GUI module
ii  libstdc++6              4.4.4-1          The GNU Standard C++ Library v3
ii  qt4-qmake               4:4.6.2-4        Qt 4 qmake Makefile generator tool
ii  zlib1g                  1: compression library - runtime

Versions of packages libqt4-dev recommends:
ii  libqt4-opengl-dev             4:4.6.2-4  Qt 4 OpenGL library development fi

Versions of packages libqt4-dev suggests:
pn  firebird2.1-dev        <none>            (no description available)
ii  libmysqlclient15-dev [ 5.0.51a-24+lenny1 MySQL database development files
ii  libpq-dev              8.4.4-1           header files for libpq5 (PostgreSQ
pn  libsqlite0-dev         <none>            (no description available)
ii  libsqlite3-dev        SQLite 3 development files
ii  qt4-dev-tools          4:4.6.2-4         Qt 4 development tools
ii  qt4-doc                4:4.6.2-4         Qt 4 API documentation
pn  unixodbc-dev           <none>            (no description available)

-- no debconf information

Reply to: