Commit Graph

8 Commits

Author SHA1 Message Date
Axel Waggershauser
5fcf441392 Fix '=' alignment and replace tabs in *.conf (whitespace only change)
Replace all tabs with proper space characters and consistently align
the '=' characters. The default alignment for the '=' of 25 characters
has been left as is to get a minimal diff. Lines with the '=' further
to the right and those belonging to 'proper code (TM)' have not been
touched.

The work was mostly done using the following python script (might
come in handy again...):

import sys, re
indent_eq = 25 + 0*4 # 25 characters was the most widely used indentation for the '=' character
p = re.compile(r'(\w+)[ \t]*([\-\+]?)(=$|= )[ \t]*(.*$)')

for fn in sys.argv[1:]:
    with open(fn, 'r+') as f:
        lines = []
        nl_count = 0
        continuity_indent = None
        for l in f:
            m = p.match(l)
            nl = l
            if m:
                n_spaces = max(m.start(3), indent_eq - 1) - len(m.group(2)) - len(m.group(1))
                if m.group(2) and m.start(2) >= indent_eq-1 and m.start(2) % 4 == 0:
                    n_spaces -= 1 # left-shift '+=' by one if the '+' is aligned to a multiple of 4
                n_spaces = max(1, n_spaces) # we want at least one space before '='/'+='
                nl = m.group(1) + ' '*n_spaces + ''.join(m.group(2,3,4)) + '\n'
                continuity_indent = nl.find('= ') + 2 if l[-2] == '\\' else None # remember indent on '\\$'
            elif continuity_indent:
                nl = ' '*continuity_indent + l.lstrip()
                if l[-2] != '\\': # check when to stop the continuation
                    continuity_indent = None
            elif l.startswith('#'):
                nl = l.expandtabs(2)
            if l != nl:
                nl_count += 1
            lines.append(nl)
        if nl_count > 0:
            print fn, nl_count, len(lines)
            f.seek(0)
            f.writelines(lines)
            f.truncate()

Change-Id: I1d2870d0a2fe2e30d398c140fe523e69dd20c81b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-27 17:16:37 +01:00
Axel Waggershauser
b11317a643 Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.

Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp

Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.

Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-16 20:22:50 +01:00
Tor Arne Vestbø
d28f454a67 Rename gcc-base-macx.conf to gcc-base-mac.conf and use it for iOS as well
The only difference between the two is that iOS append @executable_path/
to QMAKE_LFLAGS_SONAME, but since shared libraries are not supported on
iOS anyways, this is not really something we have to care about.

Change-Id: I4797a4dfb94d9b3af03af22618351b98b48f8255
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-03-05 18:40:12 +01:00
Thiago Macieira
6a51062e99 Move the SSE2/AVX/Neon/etc. flags into the compiler mkspecs
This allows us to have different flags for the compilers for
supporting the same feature. For example, the official flag in GCC to
support AVX2 is -mavx2, but ICC does not support it (yet), requiring
-march=core-avx2 or -xCORE-AVX2. That flag, instead, enables support
for all the features that the "Core-AVX2" processor (codename Haswell)
will support. And clearly, the MSVC flags are different.

Change-Id: I33b6d8617520925e807747180a8dbaafd79b7a9a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-12 04:29:42 +02:00
Lars Knoll
2b21dd69d6 turn off exceptions by default where they aren't required
This significantly reduces the size of the generated code
in places where we don't need exceptions.

The -(no-)exceptions configure flag has been removed in the
process, as there is now a fine grained way to control this
on a per module level, and Qt is being compiled without
exceptions in most places.

Change-Id: I99a15c5d03339db1fbffd4987935d0d671cdbc32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-17 05:14:26 +02:00
Qt4iOS
f9048b3465 Added mkspecs for iOS.
Modified common MacOS gcc config for iOS compatibility. Added iOS
mkspecs for iOS devices and simulator using G++, LLVM-G++ or CLANG
compilers.

Change-Id: If0a0b1a3ce4e0dc4db319a315e227a9d31549399
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-26 03:15:22 +02:00
Olivier Goffart
482d96a0c5 Force -fPIE on ELF if Qt is built with reduced relocations
Put in qconfig.h whether qt is compiled with reduced relocations.

When using -Bsymbolic-functions (enabled by default on Qt)
but not -fPIE, the comparison of the function pointers fail
because the addresses are different in Qt, and in the executable.

Hence we now enable -fPIE by default on qmake, and force a compilation
error when it is not enabled and built with reduced relocations.

Done-with: Sune Vuorela <sune@vuorela.dk>
Change-Id: Ib3fdba06fab6e8a93b75b4c6cf16cc973ab335db
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-10 11:42:31 +01:00
Qt by Nokia
38be0d1383 Initial import from the monolithic Qt.
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
Qt Git wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:

http://qt.gitorious.org/qt/pages/GitIntroductionWithQt

If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.

Branched from the monolithic repo, Qt master branch, at commit
896db169ea224deb96c59ce8af800d019de63f12
2011-04-27 12:05:43 +02:00