diff --git a/doc/addressbook-sdk.qdoc b/doc/addressbook-sdk.qdoc index 9737100f2557b3baed5e15e5023fde52e8d0f864..d8f5c463f280a6fa2c136dfa85721f854b53e323 100644 --- a/doc/addressbook-sdk.qdoc +++ b/doc/addressbook-sdk.qdoc @@ -215,8 +215,8 @@ \snippet examples/addressbook-sdk/part1/main.cpp main function - The code constructs a new \c AddressBook widget on the stack and - invokes its \l{QWidget::}{show()} function to display it. + The code constructs a new \c AddressBook widget on the stack and + invokes its \l{QWidget::}{show()} function to display it. However, the widget will not be shown until the application's event loop is started. This is done by calling the application's \l{QApplication::}{exec()} function. Finally, the result returned by diff --git a/doc/coding-style.qdoc b/doc/coding-style.qdoc index 92652db7808287a511058eb27566f21865d5aea4..33bba43b1b2351919b7292c2cf4514b4230a3275 100644 --- a/doc/coding-style.qdoc +++ b/doc/coding-style.qdoc @@ -32,8 +32,8 @@ that you: the case that you have better ideas, discuss them with other developers before writing the code. \o Take advantage of Qt. Don't re-invent the wheel. Think about what parts - of your code are generic enough that they might be incorporated into - Qt proper. + of your code are generic enough that they might be incorporated into + Qt proper. \o Document interfaces. Right now we use qdoc, but changing to doxygen is being considered. \endlist @@ -88,7 +88,7 @@ in C++. \endcode -\o Using Qt's foreach is ok in non-time critical code when using a QTL +\o Using Qt's foreach is ok in non-time critical code when using a QTL container. It is a nice way to keep line noise down and to give the loop variable a proper name: @@ -102,14 +102,14 @@ in C++. for (Container::iterator it = container.begin(); it != end; ++it) doSomething(*it); \endcode - - If the loop variable can be made const, do so. This can prevent + + If the loop variable can be made const, do so. This can prevent unnecessary detaching of shared data in some cases. So: \code foreach (const QString &name, someListOfNames) doSomething(name); - + - NOT - foreach (QString name, someListOfNames) @@ -137,7 +137,7 @@ Only one declaration on each line. -NOT- QString a = "Joe", b = "Foo"; // not used in Qt Creator \endcode - [Note that 'QString a = "Joe"' is formally calling a copy constructor + [Note that 'QString a = "Joe"' is formally calling a copy constructor on a temporary constructed from a string literal and therefore has the potential of being more expensive then direct construction by 'QString a("joe")'. However the compiler is allowed to elide the copy @@ -146,7 +146,7 @@ Only one declaration on each line. line with the traditional C-style initialization, _and_ cannot be mistaken as function declaration, _and_ reduces the level of nested parantheses in more initializations.] - + \section2 Pointers and references @@ -419,7 +419,7 @@ Line breaks \section2 File headers - If you create a new file, the top of the file should include a + If you create a new file, the top of the file should include a header comment equal to the one found in other source files of Qt Creator. \section2 Include order @@ -454,7 +454,7 @@ Line breaks You document for the other developers, not for yourself. In the header you should document interfaces, i.e. what the function does, not the implementation. - In the .cpp files you document the implementation if the implementation + In the .cpp files you document the implementation if the implementation in non-obvious. diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index 9d9719d930fb12edfccdf52c47bef475108e77c7..52a6186ee66d46732ab0d63e0f822619cab955c5 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -2476,7 +2476,7 @@ that if the user uses the SSH Library in an application they wish to redistribute, then the complete source code for your application must be available and freely redistributable under reasonable conditions. - For more information on the used QPL License see: + For more information on the used QPL License see: QtCreator/src/libs/3rdparty/net7ssh/LICENSE.QPL \endlist\br\br The source code of NetSieben Secure Shell C++ Library can be found diff --git a/scripts/snapshots/cleanup_snapshots.sh b/scripts/snapshots/cleanup_snapshots.sh index db283edd4418fa71447dbbf0c6c55225bf5c3501..3d60dddc671ba5e03f90644ac3d2f80fcce092a6 100755 --- a/scripts/snapshots/cleanup_snapshots.sh +++ b/scripts/snapshots/cleanup_snapshots.sh @@ -83,5 +83,5 @@ exit 0 ## Properly close subshell -) +) exit $? diff --git a/scripts/snapshots/create_nullbyte_snapshots.sh b/scripts/snapshots/create_nullbyte_snapshots.sh index 9099d183d2625e9054128e17508228af8467a8ae..33af90ead1fc719cafa0959644ea6c3725583a42 100755 --- a/scripts/snapshots/create_nullbyte_snapshots.sh +++ b/scripts/snapshots/create_nullbyte_snapshots.sh @@ -54,5 +54,5 @@ exit 0 ## Properly close subshell -) +) exit $? diff --git a/share/qtcreator/gdbmacros/dumper.py b/share/qtcreator/gdbmacros/dumper.py index c10437e69c002275d48e1e23f91c8e53fcfa8672..d70932a556341a13598fcadb3c034391517ab917 100644 --- a/share/qtcreator/gdbmacros/dumper.py +++ b/share/qtcreator/gdbmacros/dumper.py @@ -999,7 +999,7 @@ class Dumper: self.putNumChild(0) isHandled = True - #warn("TARGET: %s " % target) + #warn("TARGET: %s " % target) if (not isHandled) and (target == "char" or target == "signed char" or target == "unsigned char"): # Display values up to given length directly diff --git a/share/qtcreator/gdbmacros/gdbmacros.cpp b/share/qtcreator/gdbmacros/gdbmacros.cpp index 58fe77970656cfb62931c75456d308852540ee96..ee75ff511c28ca3cea8668e2af275f963d4ff957 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.cpp +++ b/share/qtcreator/gdbmacros/gdbmacros.cpp @@ -1078,7 +1078,7 @@ static void qDumpQAbstractItem(QDumper &d) { ModelIndex *mm = reinterpret_cast<ModelIndex *>(&mi); mm->r = mm->c = 0; - mm->p = mm->m = 0; + mm->p = mm->m = 0; static const char *printFormat = sizeof(void *) == sizeof(long) ? "%d,%d,0x%lx,0x%lx" : "%d,%d,0x%llx,0x%llx"; sscanf(d.templateParameters[0], printFormat, &mm->r, &mm->c, &mm->p, &mm->m); @@ -2150,7 +2150,7 @@ static void qDumpQVariantHelper(const QVariant *v, QString *value, case QVariant::KeySequence: #ifndef QT_NO_SHORTCUT *value = qvariant_cast<QKeySequence>(*v).toString(); - #else + #else *value = QString::fromLatin1("Disabled by QT_NO_SHORTCUT"); #endif break; @@ -2803,7 +2803,7 @@ static void qDumpQSharedPointer(QDumper &d) const QSharedPointer<int> &ptr = *reinterpret_cast<const QSharedPointer<int> *>(d.data); - if (ptr.isNull()) { + if (ptr.isNull()) { d.putItem("value", "<null>"); d.putItem("valueeditable", "false"); d.putItem("numchild", 0); @@ -3746,9 +3746,9 @@ static inline void dumpSizes(QDumper &d) const SizeMap::const_iterator cend = sizeMap.constEnd(); for (SizeMap::const_iterator it = sizeMap.constBegin(); it != cend; ++it) { // new size list - if (it.key() != lastSize) { + if (it.key() != lastSize) { if (lastSize) - d.put("],"); + d.put("],"); d.put("[\""); d.put(it.key()); lastSize = it.key(); @@ -3758,7 +3758,7 @@ static inline void dumpSizes(QDumper &d) d.put(it.value()); d.put('"'); } - d.put("]]"); + d.put("]]"); } extern "C" Q_DECL_EXPORT diff --git a/share/qtcreator/gdbmacros/gdbmacros.pro b/share/qtcreator/gdbmacros/gdbmacros.pro index 0f1bc0f77e3fcfb2157e8c55c0999cd21326406a..812b1fe2624e52e2e9b7c343e984606d20cabe4f 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.pro +++ b/share/qtcreator/gdbmacros/gdbmacros.pro @@ -1,15 +1,15 @@ TEMPLATE = lib CONFIG += shared -linux-* { +linux-* { CONFIG -= release CONFIG += debug } SOURCES = gdbmacros.cpp -false { +false { DEFINES += USE_QT_GUI=0 QT = core } -else { +else { DEFINES += USE_QT_GUI=1 QT = core \ gui diff --git a/share/qtcreator/gdbmacros/gdbmacros.py b/share/qtcreator/gdbmacros/gdbmacros.py index daa85417dc3385cda40ceb1c7b16afdd06cce08f..24ffdd245e0aae4eba248b80a855431c0f2aeedf 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.py +++ b/share/qtcreator/gdbmacros/gdbmacros.py @@ -225,10 +225,10 @@ def qdump__QFileInfo(d, item): def qdump__QFlags(d, item): - #warn("QFLAGS: %s" % item.value) + #warn("QFLAGS: %s" % item.value) i = item.value["i"] enumType = item.value.type.template_argument(0) - #warn("QFLAGS: %s" % item.value["i"].cast(enumType)) + #warn("QFLAGS: %s" % item.value["i"].cast(enumType)) d.putValue("%s (%s)" % (i.cast(enumType), i)) d.putNumChild(0) diff --git a/share/qtcreator/gdbmacros/test/main.cpp b/share/qtcreator/gdbmacros/test/main.cpp index f77486fae49873ae9fcee9549d7ffee8dbc3e420..65cd27f8a6162ca0bbb86c14ca1310755887c5f3 100644 --- a/share/qtcreator/gdbmacros/test/main.cpp +++ b/share/qtcreator/gdbmacros/test/main.cpp @@ -248,7 +248,7 @@ static int dumpQMapQStringString() test.insert(QLatin1String("42s"), QLatin1String("fortytwo")); test.insert(QLatin1String("423"), QLatin1String("fortytree")); } - prepareInBuffer("QMap", "local.qmapqstringqstring", "local.qmapqstringqstring", "QString@QString"); + prepareInBuffer("QMap", "local.qmapqstringqstring", "local.qmapqstringqstring", "QString@QString"); qDumpObjectData440(2, 42, testAddress(&test), 1, sizeof(QString), sizeof(QString), sizeof(mapNode), valueOffset); fputs(qDumpOutBuffer, stdout); fputc('\n', stdout); @@ -454,7 +454,7 @@ static int dumpStdQStringSet() static int dumpStdMapIntString() { - std::map<int,std::string> test; + std::map<int,std::string> test; std::map<int,std::string>::value_type entry(42, std::string("fortytwo")); if (!optEmptyContainers) { test.insert(entry); diff --git a/src/libs/3rdparty/botan/build/botan/build_unix.h b/src/libs/3rdparty/botan/build/botan/build_unix.h index a534bf89ff8db80fdc0cabe339319bd9d41ddeb8..f921de9b50df94c5bcfc843d29c0d87178cff092 100644 --- a/src/libs/3rdparty/botan/build/botan/build_unix.h +++ b/src/libs/3rdparty/botan/build/botan/build_unix.h @@ -196,7 +196,7 @@ christian@christian-linux ran 'configure.py --os=linux --cpu=ia32 --cc=gcc --dis Target ------- -Compiler: g++ -O2 -finline-functions +Compiler: g++ -O2 -finline-functions Arch: ia32/ia32 OS: linux diff --git a/src/libs/3rdparty/botan/build/botan/build_windows.h b/src/libs/3rdparty/botan/build/botan/build_windows.h index 2ac5852a39570573bde94392d81c1578ddf6fe1d..e4bc6c6a0bbcb8c851334d59e1841ae2ca11f4e2 100644 --- a/src/libs/3rdparty/botan/build/botan/build_windows.h +++ b/src/libs/3rdparty/botan/build/botan/build_windows.h @@ -182,7 +182,7 @@ kheimric@deepburner ran 'E:\dev\creator\src\libs\3rdparty\botan\configure.py --c Target ------- -Compiler: cl.exe /O2 +Compiler: cl.exe /O2 Arch: ia64/ia64 OS: windows diff --git a/src/libs/3rdparty/botan/doc/examples/asn1.cpp b/src/libs/3rdparty/botan/doc/examples/asn1.cpp index 95757ec19e5fcedf05f49cdafaf470d72d130c7c..e8fc0158733827fd2f3fe613473dd4409eb9e680 100644 --- a/src/libs/3rdparty/botan/doc/examples/asn1.cpp +++ b/src/libs/3rdparty/botan/doc/examples/asn1.cpp @@ -56,7 +56,7 @@ int main(int argc, char* argv[]) printf("Usage: %s <file>\n", argv[0]); return 1; } - + Botan::LibraryInitializer init; try { diff --git a/src/libs/3rdparty/botan/doc/examples/dh.cpp b/src/libs/3rdparty/botan/doc/examples/dh.cpp index 7855aeae5e0a6a794e760d2d4f51d4ac5f9c1e61..c8089280ef3e1d22eca4324cfb36606c6325417c 100644 --- a/src/libs/3rdparty/botan/doc/examples/dh.cpp +++ b/src/libs/3rdparty/botan/doc/examples/dh.cpp @@ -16,7 +16,7 @@ using namespace Botan; int main() { Botan::LibraryInitializer init; - + try { AutoSeeded_RNG rng; diff --git a/src/libs/3rdparty/botan/doc/examples/make_prime.cpp b/src/libs/3rdparty/botan/doc/examples/make_prime.cpp index eaff1867f3dd0619d76d13c08fa2079f32055d24..0c90b2bda94e085b75b890d187c104d67f08c6db 100644 --- a/src/libs/3rdparty/botan/doc/examples/make_prime.cpp +++ b/src/libs/3rdparty/botan/doc/examples/make_prime.cpp @@ -37,7 +37,7 @@ int main() if(p.bits() != bits) { - std::cout << "Asked for " << bits << " got " << p + std::cout << "Asked for " << bits << " got " << p << " " << p.bits() << " bits\n"; return 1; } diff --git a/src/libs/3rdparty/botan/src/src.pro b/src/libs/3rdparty/botan/src/src.pro index ad314dad4522dae8ea8b93e0239508060a780579..7b2daf69346999a557a9865d9e0e614c12a02bc4 100644 --- a/src/libs/3rdparty/botan/src/src.pro +++ b/src/libs/3rdparty/botan/src/src.pro @@ -7,7 +7,7 @@ include(../../../../qtcreatorlibrary.pri) DEPENDPATH += . INCLUDEPATH += $$PWD $$PWD/../build $$PWD/../build/botan - + win32 { LIBS += advapi32.lib user32.lib win32-msvc*: QMAKE_CXXFLAGS += -wd4251 -wd4290 diff --git a/src/libs/3rdparty/botan/wrappers/boost-python/nisttest.py b/src/libs/3rdparty/botan/wrappers/boost-python/nisttest.py index 3ea8fda0fa0cb0cf88792d8c1819e484a2aeb125..f9fdb5fbf10962ee7e53b26804f754146d3b2760 100644 --- a/src/libs/3rdparty/botan/wrappers/boost-python/nisttest.py +++ b/src/libs/3rdparty/botan/wrappers/boost-python/nisttest.py @@ -31,7 +31,7 @@ def run_test(files, rootdir, testname, expected): result = validate(ca_certs, certs, crls, end_entity) result = repr(result).replace('botan._botan.verify_result.', '') - + if result != expected: print "FAILED: got %s, expected %s" % (result, expected) else: @@ -56,6 +56,6 @@ def main(): run_test(files, root, thistest, results[thistest]) else: print "%s... skipping - no expected result set" % thistest - + if __name__ == "__main__": sys.exit(main()) diff --git a/src/libs/3rdparty/botan/wrappers/boost-python/src/x509.cpp b/src/libs/3rdparty/botan/wrappers/boost-python/src/x509.cpp index 90c2bba1c7a8f50427d75bb6ebfb20dc944f7dfc..c37575f1560f6d96200cb1e7356d683d50c58a65 100644 --- a/src/libs/3rdparty/botan/wrappers/boost-python/src/x509.cpp +++ b/src/libs/3rdparty/botan/wrappers/boost-python/src/x509.cpp @@ -126,7 +126,7 @@ void export_x509() .value("crl_signing", X509_Store::CRL_SIGNING); { - python::scope in_class = + python::scope in_class = python::class_<X509_Store>("X509_Store") .def("add_cert", &X509_Store::add_cert, add_cert_ols()) .def("validate", &X509_Store::validate_cert, validate_cert_ols()) diff --git a/src/libs/3rdparty/botan/wrappers/swig/doit.py b/src/libs/3rdparty/botan/wrappers/swig/doit.py index 98bc97087bdd2b4157dd5db159af29e074c56856..a84623e871f083323a264a8de00aec5fa45bccfa 100644 --- a/src/libs/3rdparty/botan/wrappers/swig/doit.py +++ b/src/libs/3rdparty/botan/wrappers/swig/doit.py @@ -15,7 +15,7 @@ def hash_it(hash, input): out = pipe.read(0) - + def main: diff --git a/src/libs/3rdparty/botan/wrappers/swig/tests/encrypt.py b/src/libs/3rdparty/botan/wrappers/swig/tests/encrypt.py index 9896777d4a836e6b5ecd884f9e83b5a93376176e..c36bab4066741537cd263df0ce11fe1a416fb841 100644 --- a/src/libs/3rdparty/botan/wrappers/swig/tests/encrypt.py +++ b/src/libs/3rdparty/botan/wrappers/swig/tests/encrypt.py @@ -9,7 +9,7 @@ def encrypt(input): print cipher_key.length cipher = botan.Filter("ARC4", key = cipher_key) - + pipe = botan.Pipe(cipher, botan.Filter("Hex_Encoder")) pipe.start_msg() diff --git a/src/libs/3rdparty/botan/wrappers/swig/tests/filter.py b/src/libs/3rdparty/botan/wrappers/swig/tests/filter.py index 2b65d9ff2150464585156dd507359a509410592c..42637ba21bca6da4a39ad374891ac68c4b5332fa 100644 --- a/src/libs/3rdparty/botan/wrappers/swig/tests/filter.py +++ b/src/libs/3rdparty/botan/wrappers/swig/tests/filter.py @@ -15,7 +15,7 @@ class MyFilter(botan.FilterObj): def main(): filter = MyFilter() - + pipe = botan.Pipe(botan.Filter("Hex_Encoder"), filter, botan.Filter("Hex_Decoder")) pipe.start_msg() diff --git a/src/libs/3rdparty/net7ssh/examples/generateKeys.cpp b/src/libs/3rdparty/net7ssh/examples/generateKeys.cpp index 6fbbb71e5bed24e069a0eb96f1fe128c27fbde66..c5c0d70cbc08a8f082ae0938fa4e9e3bedaf2ad2 100644 --- a/src/libs/3rdparty/net7ssh/examples/generateKeys.cpp +++ b/src/libs/3rdparty/net7ssh/examples/generateKeys.cpp @@ -1,9 +1,9 @@ /* An example of ne7ssh library usage. This code will generate a DSA key pair and store private key in ./privKeyFile and public key in ./pubKeyFile. - + If you are testing this with later openssh versions, make sure to add this option to your server's configuration file to enable password authentication: - + PasswordAuthentication yes */ @@ -12,7 +12,7 @@ int main(int argc,char *argv[]) { ne7ssh *_ssh = new ne7ssh(); - + // Generating DSA keys if (!_ssh->generateKeyPair ("rsa", "test@test.com", "./privKeyFile", "./pubKeyFile", 2048)) { @@ -23,6 +23,6 @@ int main(int argc,char *argv[]) printf ("Key gneration failed with last error: %s.\n\n", errmsg); } - delete _ssh; + delete _ssh; return EXIT_SUCCESS; } diff --git a/src/libs/3rdparty/net7ssh/examples/keyAuth.cpp b/src/libs/3rdparty/net7ssh/examples/keyAuth.cpp index 21058a62a2ccc20fc18b5ac6859bf3f66df94301..e12fc12069771e2341d861f6d23e71714fe8b86e 100644 --- a/src/libs/3rdparty/net7ssh/examples/keyAuth.cpp +++ b/src/libs/3rdparty/net7ssh/examples/keyAuth.cpp @@ -1,13 +1,13 @@ -/* An example of ne7ssh library usage. Please change the values in connectWitKeys +/* An example of ne7ssh library usage. Please change the values in connectWitKeys function before compiling. - + This will work with openssh server if default shell of authenticating user is bash. - When using a different shell or custom prompt replace " $" string in waitFor() + When using a different shell or custom prompt replace " $" string in waitFor() method with a string corresponding with your shell prompt. - + If you are testing this with later openssh versions, make sure to add this option to your server's configuration file to enable password authentication: - + PasswordAuthentication yes */ diff --git a/src/libs/3rdparty/net7ssh/examples/multipleThreads.cpp b/src/libs/3rdparty/net7ssh/examples/multipleThreads.cpp index ec267efa32e7bfd2b27b2b3fb73c19a1226e5fde..5cb68649ecad6b5425e7fb5a3a9b20cf06430aa1 100644 --- a/src/libs/3rdparty/net7ssh/examples/multipleThreads.cpp +++ b/src/libs/3rdparty/net7ssh/examples/multipleThreads.cpp @@ -1,13 +1,13 @@ -/* An example of ne7ssh library usage. Please change the values in connectWithPassword +/* An example of ne7ssh library usage. Please change the values in connectWithPassword function before compiling. - + This will work with openssh server if default shell of authenticating user is bash. - When using a different shell or custom prompt replace " $" string in waitFor() + When using a different shell or custom prompt replace " $" string in waitFor() method with a string corresponding with your shell prompt. - + If you are testing this with later openssh versions, make sure to add this option to your server's configuration file to enable password authentication: - + PasswordAuthentication yes */ #include <string.h> @@ -186,7 +186,7 @@ void* thread2_proc (void* initData) continue; } result = _ssh->read (channel1); - + printf ("Data Count: %i, Thread %i: %s\n\n", i, thrid, result); // Send "ls" command. diff --git a/src/libs/3rdparty/net7ssh/examples/passwordAuth.cpp b/src/libs/3rdparty/net7ssh/examples/passwordAuth.cpp index 9025bf92593179a1538cabff84dd0af359d7b7c7..d45e8a472d0eb6093de9754dbea428c196284713 100644 --- a/src/libs/3rdparty/net7ssh/examples/passwordAuth.cpp +++ b/src/libs/3rdparty/net7ssh/examples/passwordAuth.cpp @@ -1,13 +1,13 @@ -/* An example of ne7ssh library usage. Please change the values in connectWithPassword +/* An example of ne7ssh library usage. Please change the values in connectWithPassword function before compiling. - + This will work with openssh server if default shell of authenticating user is bash. - When using a different shell or custom prompt replace " $" string in waitFor() + When using a different shell or custom prompt replace " $" string in waitFor() method with a string corresponding with your shell prompt. - + If you are testing this with later openssh versions, make sure to add this option to your server's configuration file to enable password authentication: - + PasswordAuthentication yes */ diff --git a/src/libs/3rdparty/net7ssh/examples/sftpExample.cpp b/src/libs/3rdparty/net7ssh/examples/sftpExample.cpp index 2a2c6cea2193d41e0a098a090905aa914e773a70..c73a9920806c1716227ea06c3f8808a80759dfef 100644 --- a/src/libs/3rdparty/net7ssh/examples/sftpExample.cpp +++ b/src/libs/3rdparty/net7ssh/examples/sftpExample.cpp @@ -1,9 +1,9 @@ -/* An example of ne7ssh library usage. Please change the values in connectWithPassword +/* An example of ne7ssh library usage. Please change the values in connectWithPassword function before compiling. - + If you are testing this with later openssh versions, make sure to add this option to your server's configuration file to enable password authentication: - + PasswordAuthentication yes */ diff --git a/src/libs/3rdparty/net7ssh/src/crypt.cpp b/src/libs/3rdparty/net7ssh/src/crypt.cpp index 61a3101d29effca8fe47e1aea48cbf52dc4d2be5..fb300a232465daafd908b4747eb0a2066e42af8a 100644 --- a/src/libs/3rdparty/net7ssh/src/crypt.cpp +++ b/src/libs/3rdparty/net7ssh/src/crypt.cpp @@ -52,12 +52,12 @@ bool ne7ssh_crypt::agree (Botan::SecureVector<Botan::byte> &result, const char* char* localAlgo, *remoteAlgo; bool match; size_t len; - + localAlgos.split (','); localAlgos.resetParts(); remoteAlgos.split (','); remoteAlgos.resetParts(); - + match = false; while ((localAlgo = localAlgos.nextPart())) { @@ -73,12 +73,12 @@ bool ne7ssh_crypt::agree (Botan::SecureVector<Botan::byte> &result, const char* if (match) break; remoteAlgos.resetParts(); } - if (match) + if (match) { result.set ((Botan::byte*)localAlgo, (uint32_t) len); return true; } - else + else { result.clear(); return false; @@ -87,17 +87,17 @@ bool ne7ssh_crypt::agree (Botan::SecureVector<Botan::byte> &result, const char* bool ne7ssh_crypt::negotiatedKex (Botan::SecureVector<Botan::byte> &kexAlgo) { - if (!memcmp (kexAlgo.begin(), "diffie-hellman-group1-sha1", kexAlgo.size())) + if (!memcmp (kexAlgo.begin(), "diffie-hellman-group1-sha1", kexAlgo.size())) { kexMethod = DH_GROUP1_SHA1; return true; } - else if (!memcmp (kexAlgo.begin(), "diffie-hellman-group14-sha1", kexAlgo.size())) + else if (!memcmp (kexAlgo.begin(), "diffie-hellman-group14-sha1", kexAlgo.size())) { kexMethod = DH_GROUP14_SHA1; return true; } - + ne7ssh::errors()->push (session->getSshChannel(), "KEX algorithm: '%B' not defined.", &kexAlgo); return false; } @@ -114,14 +114,14 @@ bool ne7ssh_crypt::negotiatedHostkey (Botan::SecureVector<Botan::byte> &hostkeyA hostkeyMethod = SSH_RSA; return true; } - + ne7ssh::errors()->push (session->getSshChannel(), "Hostkey algorithm: '%B' not defined.", &hostkeyAlgo); return false; } bool ne7ssh_crypt::negotiatedCryptoC2s (Botan::SecureVector<Botan::byte> &cryptoAlgo) { - if (!memcmp (cryptoAlgo.begin(), "3des-cbc", cryptoAlgo.size())) + if (!memcmp (cryptoAlgo.begin(), "3des-cbc", cryptoAlgo.size())) { c2sCryptoMethod = TDES_CBC; return true; @@ -156,14 +156,14 @@ bool ne7ssh_crypt::negotiatedCryptoC2s (Botan::SecureVector<Botan::byte> &crypto c2sCryptoMethod = TWOFISH_CBC; return true; } - + ne7ssh::errors()->push (session->getSshChannel(), "Cryptographic algorithm: '%B' not defined.", &cryptoAlgo); return false; } bool ne7ssh_crypt::negotiatedCryptoS2c (Botan::SecureVector<Botan::byte> &cryptoAlgo) { - if (!memcmp (cryptoAlgo.begin(), "3des-cbc", cryptoAlgo.size())) + if (!memcmp (cryptoAlgo.begin(), "3des-cbc", cryptoAlgo.size())) { s2cCryptoMethod = TDES_CBC; return true; @@ -205,17 +205,17 @@ bool ne7ssh_crypt::negotiatedCryptoS2c (Botan::SecureVector<Botan::byte> &crypto bool ne7ssh_crypt::negotiatedMacC2s (Botan::SecureVector<Botan::byte> &macAlgo) { - if (!memcmp (macAlgo.begin(), "hmac-sha1", macAlgo.size())) + if (!memcmp (macAlgo.begin(), "hmac-sha1", macAlgo.size())) { c2sMacMethod = HMAC_SHA1; return true; } - else if (!memcmp (macAlgo.begin(), "hmac-md5", macAlgo.size())) + else if (!memcmp (macAlgo.begin(), "hmac-md5", macAlgo.size())) { c2sMacMethod = HMAC_MD5; return true; } - else if (!memcmp (macAlgo.begin(), "none", macAlgo.size())) + else if (!memcmp (macAlgo.begin(), "none", macAlgo.size())) { c2sMacMethod = HMAC_NONE; return true; @@ -227,56 +227,56 @@ bool ne7ssh_crypt::negotiatedMacC2s (Botan::SecureVector<Botan::byte> &macAlgo) bool ne7ssh_crypt::negotiatedMacS2c (Botan::SecureVector<Botan::byte> &macAlgo) { - if (!memcmp (macAlgo.begin(), "hmac-sha1", macAlgo.size())) + if (!memcmp (macAlgo.begin(), "hmac-sha1", macAlgo.size())) { s2cMacMethod = HMAC_SHA1; return true; } - else if (!memcmp (macAlgo.begin(), "hmac-md5", macAlgo.size())) + else if (!memcmp (macAlgo.begin(), "hmac-md5", macAlgo.size())) { s2cMacMethod = HMAC_MD5; return true; } - else if (!memcmp (macAlgo.begin(), "none", macAlgo.size())) + else if (!memcmp (macAlgo.begin(), "none", macAlgo.size())) { s2cMacMethod = HMAC_NONE; return true; } - + ne7ssh::errors()->push (session->getSshChannel(), "HMAC algorithm: '%B' not defined.", &macAlgo); return false; } bool ne7ssh_crypt::negotiatedCmprsC2s (Botan::SecureVector<Botan::byte> &cmprsAlgo) { - if (!memcmp (cmprsAlgo.begin(), "none", cmprsAlgo.size())) + if (!memcmp (cmprsAlgo.begin(), "none", cmprsAlgo.size())) { c2sCmprsMethod = NONE; return true; } - else if (!memcmp (cmprsAlgo.begin(), "zlib", cmprsAlgo.size())) + else if (!memcmp (cmprsAlgo.begin(), "zlib", cmprsAlgo.size())) { c2sCmprsMethod = ZLIB; return true; } - + ne7ssh::errors()->push (session->getSshChannel(), "Compression algorithm: '%B' not defined.", &cmprsAlgo); return false; } bool ne7ssh_crypt::negotiatedCmprsS2c (Botan::SecureVector<Botan::byte> &cmprsAlgo) { - if (!memcmp (cmprsAlgo.begin(), "none", cmprsAlgo.size())) + if (!memcmp (cmprsAlgo.begin(), "none", cmprsAlgo.size())) { s2cCmprsMethod = NONE; return true; } - else if (!memcmp (cmprsAlgo.begin(), "zlib", cmprsAlgo.size())) + else if (!memcmp (cmprsAlgo.begin(), "zlib", cmprsAlgo.size())) { s2cCmprsMethod = ZLIB; return true; } - + ne7ssh::errors()->push (session->getSshChannel(), "Compression algorithm: '%B' not defined.", &cmprsAlgo); return false; } @@ -290,7 +290,7 @@ bool ne7ssh_crypt::getKexPublic (Botan::BigInt &publicKey) case DH_GROUP14_SHA1: return getDHGroup14Sha1Public (publicKey); - + default: ne7ssh::errors()->push (session->getSshChannel(), "Undefined DH Group: '%s'.", kexMethod); return false; @@ -300,19 +300,19 @@ bool ne7ssh_crypt::getKexPublic (Botan::BigInt &publicKey) bool ne7ssh_crypt::computeH (Botan::SecureVector<Botan::byte> &result, Botan::SecureVector<Botan::byte> &val) { HashFunction* hashIt; - + switch (kexMethod) { case DH_GROUP1_SHA1: case DH_GROUP14_SHA1: hashIt = get_hash ("SHA-1"); break; - + default: ne7ssh::errors()->push (session->getSshChannel(), "Undefined DH Group: '%s' while computing H.", kexMethod); return false; } - + if (!hashIt) return false; H = hashIt->process (val); result.set (H); @@ -328,13 +328,13 @@ bool ne7ssh_crypt::verifySig (Botan::SecureVector<Botan::byte> &hostKey, Botan:: ne7ssh_string signature (sig, 0); SecureVector<Botan::byte> sigType, sigData; bool result; - + if (H.is_empty()) { ne7ssh::errors()->push (session->getSshChannel(), "H was not initialzed."); return false; } - + if (!signature.getString (sigType)) { ne7ssh::errors()->push (session->getSshChannel(), "Signature without type."); @@ -345,7 +345,7 @@ bool ne7ssh_crypt::verifySig (Botan::SecureVector<Botan::byte> &hostKey, Botan:: ne7ssh::errors()->push (session->getSshChannel(), "Signature without data."); return false; } - + switch (hostkeyMethod) { case SSH_DSS: @@ -365,12 +365,12 @@ bool ne7ssh_crypt::verifySig (Botan::SecureVector<Botan::byte> &hostKey, Botan:: return false; } break; - + default: ne7ssh::errors()->push (session->getSshChannel(), "Hostkey algorithm: %i not supported.", hostkeyMethod); return false; } - + switch (kexMethod) { case DH_GROUP1_SHA1: @@ -378,17 +378,17 @@ bool ne7ssh_crypt::verifySig (Botan::SecureVector<Botan::byte> &hostKey, Botan:: if (dsaKey) verifier = get_pk_verifier (*dsaKey, "EMSA1(SHA-1)"); else if (rsaKey) verifier = get_pk_verifier (*rsaKey, "EMSA3(SHA-1)"); break; - + default: ne7ssh::errors()->push (session->getSshChannel(), "Key Exchange algorithm: %i not supported.", kexMethod); return false; } - + result = verifier->verify_message (H, sigData); delete verifier; if (dsaKey) delete dsaKey; if (rsaKey) delete dsaKey; - + if (!result) { ne7ssh::errors()->push (session->getSshChannel(), "Failure to verify host signature."); @@ -403,17 +403,17 @@ DSA_PublicKey* ne7ssh_crypt::getDSAKey (Botan::SecureVector<Botan::byte> &hostKe SecureVector<Botan::byte> field; BigInt p, q, g, y; DSA_PublicKey *pubKey; - + hKey.addVector (hostKey); - + if (!hKey.getString (field)) return 0; if (!negotiatedHostkey (field)) return 0; - + if (!hKey.getBigInt (p)) return 0; if (!hKey.getBigInt (q)) return 0; if (!hKey.getBigInt (g)) return 0; if (!hKey.getBigInt (y)) return 0; - + DL_Group keyDL (p, q, g); pubKey = new DSA_PublicKey (keyDL, y); return pubKey; @@ -424,32 +424,32 @@ RSA_PublicKey* ne7ssh_crypt::getRSAKey (Botan::SecureVector<Botan::byte> &hostKe ne7ssh_string hKey; SecureVector<Botan::byte> field; BigInt e, n; - + hKey.addVector (hostKey); - + if (!hKey.getString (field)) return 0; if (!negotiatedHostkey (field)) return 0; - + if (!hKey.getBigInt (e)) return 0; if (!hKey.getBigInt (n)) return 0; - + return (new RSA_PublicKey (n, e)); } - + bool ne7ssh_crypt::makeKexSecret (Botan::SecureVector<Botan::byte> &result, Botan::BigInt &f) { SymmetricKey negotiated = privKexKey->derive_key (f); if (!negotiated.length()) return false; - BigInt Kint (negotiated.begin(), negotiated.length()); + BigInt Kint (negotiated.begin(), negotiated.length()); ne7ssh_string::bn2vector(result, Kint); K.set (result); delete privKexKey; privKexKey = 0; return true; -} +} bool ne7ssh_crypt::getDHGroup1Sha1Public (Botan::BigInt &publicKey) { @@ -490,7 +490,7 @@ const char* ne7ssh_crypt::getHashAlgo () case DH_GROUP1_SHA1: case DH_GROUP14_SHA1: return "SHA-1"; - + default: ne7ssh::errors()->push (session->getSshChannel(), "DH Group: %i was not defined.", kexMethod); return 0; @@ -503,44 +503,44 @@ const char* ne7ssh_crypt::getCryptAlgo (uint32 crypto) { case TDES_CBC: return "TripleDES"; - + case AES128_CBC: return "AES-128"; - + case AES192_CBC: return "AES-192"; case AES256_CBC: return "AES-256"; - + case BLOWFISH_CBC: return "Blowfish"; - + case CAST128_CBC: return "CAST-128"; - + case TWOFISH_CBC: return "Twofish"; - + default: ne7ssh::errors()->push (session->getSshChannel(), "Cryptographic algorithm: %i was not defined.", crypto); return 0; } } - + const char* ne7ssh_crypt::getHmacAlgo (uint32 method) { switch (method) { case HMAC_SHA1: return "SHA-1"; - + case HMAC_MD5: return "MD5"; - + case HMAC_NONE: return 0; - + default: ne7ssh::errors()->push (session->getSshChannel(), "HMAC algorithm: %i was not defined.", method); return 0; @@ -553,13 +553,13 @@ uint32 ne7ssh_crypt::getMacKeyLen (uint32 method) { case HMAC_SHA1: return 20; - + case HMAC_MD5: return 16; - + case HMAC_NONE: return 0; - + default: ne7ssh::errors()->push (session->getSshChannel(), "HMAC algorithm: %i was not defined.", method); return 0; @@ -572,13 +572,13 @@ uint32 ne7ssh_crypt::getMacDigestLen (uint32 method) { case HMAC_SHA1: return 20; - + case HMAC_MD5: return 16; - + case HMAC_NONE: return 0; - + default: return 0; } @@ -601,13 +601,13 @@ bool ne7ssh_crypt::makeNewKeys () encryptBlock = iv_len = block_size_of (algo); macLen = getMacKeyLen (c2sMacMethod); if (!algo) return false; - + if (!compute_key(key, 'A', iv_len)) return false; InitializationVector c2s_iv (key); - + if (!compute_key(key, 'C', key_len)) return false; SymmetricKey c2s_key (key); - + if (!compute_key(key, 'E', macLen)) return false; SymmetricKey c2s_mac (key); @@ -619,7 +619,7 @@ bool ne7ssh_crypt::makeNewKeys () encrypt = new Pipe (new CBC_Encryption (cipher->clone(), new Null_Padding, c2s_key, c2s_iv)); #endif - if (macLen) + if (macLen) { #if BOTAN_PRE_18 && !BOTAN_PRE_15 hmacOut = new HMAC (getHmacAlgo(c2sMacMethod)); @@ -631,7 +631,7 @@ bool ne7ssh_crypt::makeNewKeys () } // if (c2sCmprsMethod == ZLIB) compress = new Pipe (new Zlib_Compression(9)); - + algo = getCryptAlgo (s2cCryptoMethod); key_len = max_keylength_of (algo); if (s2cCryptoMethod == BLOWFISH_CBC) key_len = 16; @@ -639,13 +639,13 @@ bool ne7ssh_crypt::makeNewKeys () decryptBlock = iv_len = block_size_of (algo); macLen = getMacKeyLen (c2sMacMethod); if (!algo) return false; - + if (!compute_key(key, 'B', iv_len)) return false; InitializationVector s2c_iv (key); - + if (!compute_key(key, 'D', key_len)) return false; SymmetricKey s2c_key (key); - + if (!compute_key(key, 'F', macLen)) return false; SymmetricKey s2c_mac (key); @@ -667,10 +667,10 @@ bool ne7ssh_crypt::makeNewKeys () hmacIn->set_key (s2c_mac); } // if (s2cCmprsMethod == ZLIB) decompress = new Pipe (new Zlib_Decompression); - + inited = true; return true; -} +} bool ne7ssh_crypt::compute_key (Botan::SecureVector<Botan::byte>& key, Botan::byte ID, uint32 nBytes) { @@ -680,19 +680,19 @@ bool ne7ssh_crypt::compute_key (Botan::SecureVector<Botan::byte>& key, Botan::b const char* algo = getHashAlgo(); uint32 len; - if (!algo) return false; + if (!algo) return false; hashIt = get_hash (algo); - if (!hashIt) + if (!hashIt) { ne7ssh::errors()->push (session->getSshChannel(), "Undefined HASH algorithm encountered while computing the key."); return false; } - + hashBytes.addVectorField (K); hashBytes.addVector (H); hashBytes.addChar (ID); hashBytes.addVector (session->getSessionID()); - + hash = hashIt->process (hashBytes.value()); newKey.set (hash); len = newKey.size(); @@ -707,7 +707,7 @@ bool ne7ssh_crypt::compute_key (Botan::SecureVector<Botan::byte>& key, Botan::b newKey.append (hash); len = newKey.size(); } - + key.set (newKey.begin(), nBytes); delete (hashIt); return true; @@ -723,28 +723,28 @@ bool ne7ssh_crypt::encryptPacket (Botan::SecureVector<Botan::byte> &crypted, Bot encrypt->end_msg(); // encrypt->process_msg (packet); crypted = encrypt->read_all (encrypt->message_count() - 1); - + if (hmacOut) { macStr.set ((Botan::byte*)&nSeq, 4); macStr.append (packet); hmac = hmacOut->process (macStr); } - + return true; } bool ne7ssh_crypt::decryptPacket (Botan::SecureVector<Botan::byte> &decrypted, Botan::SecureVector<Botan::byte> &packet, uint32 len) { uint32 pLen = packet.size(); - + if (len % decryptBlock) len = len + (len % decryptBlock); if (len > pLen) len = pLen; decrypt->process_msg (packet.begin(), len); decrypted = decrypt->read_all (decrypt->message_count() - 1); - + return true; } @@ -752,18 +752,18 @@ void ne7ssh_crypt::compressData (Botan::SecureVector<Botan::byte> &buffer) { SecureVector<Botan::byte> tmpVar; if (!compress) return; - + tmpVar.swap (buffer); compress->process_msg (tmpVar); tmpVar = compress->read_all (compress->message_count() - 1); buffer.set (tmpVar); } - + void ne7ssh_crypt::decompressData (Botan::SecureVector<Botan::byte> &buffer) { SecureVector<Botan::byte> tmpVar; if (!decompress) return; - + tmpVar.swap (buffer); decompress->process_msg (tmpVar); tmpVar = decompress->read_all (compress->message_count() - 1); @@ -774,7 +774,7 @@ void ne7ssh_crypt::computeMac (Botan::SecureVector<Botan::byte> &hmac, Botan::Se { SecureVector<Botan::byte> macStr; uint32 nSeq = htonl (seq); - + if (hmacIn) { macStr.set ((Botan::byte*)&nSeq, 4); diff --git a/src/libs/3rdparty/net7ssh/src/crypt.h b/src/libs/3rdparty/net7ssh/src/crypt.h index 8168fdda9abee72327de6cdff21c737385fb4767..003dcb520d6de1380bfa1cd503d651b39ae2c1d4 100644 --- a/src/libs/3rdparty/net7ssh/src/crypt.h +++ b/src/libs/3rdparty/net7ssh/src/crypt.h @@ -61,11 +61,11 @@ class ne7ssh_crypt enum macMethods { HMAC_SHA1, HMAC_MD5, HMAC_NONE }; uint32 c2sMacMethod; - uint32 s2cMacMethod; + uint32 s2cMacMethod; enum cmprsMethods { NONE, ZLIB }; uint32 c2sCmprsMethod; - uint32 s2cCmprsMethod; + uint32 s2cCmprsMethod; bool inited; Botan::SecureVector<Botan::byte> H; @@ -303,7 +303,7 @@ class ne7ssh_crypt bool makeNewKeys (); /** - * Encrypts a packet and generates HMAC, if enabled during negotiation. + * Encrypts a packet and generates HMAC, if enabled during negotiation. * <p>The entire packet is encrypted, only HMAC stays in raw format. * @param crypted Encrypted packet will be dumped into this var. * @param hmac HMAC will be dumped into this var. diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh.cpp b/src/libs/3rdparty/net7ssh/src/ne7ssh.cpp index d0d113c3245748f3be58757c9cf5b53795cf6b29..6162999e52feedb535c8355e9f260cf6c0791e6a 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh.cpp +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh.cpp @@ -69,30 +69,30 @@ class Locking_AutoSeeded_RNG : public Botan::RandomNumberGenerator public: Locking_AutoSeeded_RNG() { rng = new Botan::AutoSeeded_RNG(); } ~Locking_AutoSeeded_RNG() { delete rng; } - + void randomize(Botan::byte output[], u32bit length) { mutex.lock(); rng->randomize(output, length); mutex.unlock(); } - + void clear() throw() { mutex.lock(); rng->clear(); mutex.unlock(); } - + std::string name() const { return rng->name(); } - + void reseed(u32bit bits_to_collect) { mutex.lock(); rng->reseed(bits_to_collect); mutex.unlock(); } - + void add_entropy_source(EntropySource* source) { mutex.lock(); @@ -106,8 +106,8 @@ class Locking_AutoSeeded_RNG : public Botan::RandomNumberGenerator rng->add_entropy(in, length); mutex.unlock(); } - - private: + + private: Ne7ssh_Mutex mutex; Botan::RandomNumberGenerator* rng; }; @@ -153,10 +153,10 @@ ne7ssh::~ne7ssh() { uint32 i; long ign; - + ne7ssh::running = false; lock(); - for (i = 0; i < conCount; i++) + for (i = 0; i < conCount; i++) close(i); unlock(); @@ -164,7 +164,7 @@ ne7ssh::~ne7ssh() if (conCount) { - for (i = 0; i < conCount; i++) + for (i = 0; i < conCount; i++) delete connections[i]; free (connections); } @@ -186,7 +186,7 @@ ne7ssh::~ne7ssh() errs = 0; } #if !BOTAN_PRE_18 && !BOTAN_PRE_15 - if (ne7ssh::rng) + if (ne7ssh::rng) { delete (rng); rng = 0; @@ -313,12 +313,12 @@ int ne7ssh::connectWithPassword (const char *host, const int port, const char* u if (!unlock()) return -1; channel = con->connectWithPassword (channelID, host, port, username, password, shell, timeout); - if (channel == -1) + if (channel == -1) { if (!lock()) return -1; for (z = 0; z < allConns.count; z++) { - if (allConns.conns[z] == con) + if (allConns.conns[z] == con) { currentRecord = z; break; @@ -364,12 +364,12 @@ int ne7ssh::connectWithKey (const char* host, const int port, const char* userna channel = con->connectWithKey (channelID, host, port, username, privKeyFileName, shell, timeout); - if (channel == -1) + if (channel == -1) { if (!lock()) return -1; for (z = 0; z < allConns.count; z++) { - if (allConns.conns[z] == con) + if (allConns.conns[z] == con) { currentRecord = z; break; @@ -588,7 +588,7 @@ bool ne7ssh::waitFor (int channel, const char* str, uint32 timeSec) { if ((*carret == one) && (str_len <= carretLen)) { - if (!memcmp (carret, str, str_len)) + if (!memcmp (carret, str, str_len)) { if (!unlock()) return false; return true; diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_channel.cpp b/src/libs/3rdparty/net7ssh/src/ne7ssh_channel.cpp index c15f638f6fbe2acee0d1e7dd11a25b0ed96cacdb..48b8f68a79b0b8a323319e1460af05402c5fe429 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_channel.cpp +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_channel.cpp @@ -64,7 +64,7 @@ bool ne7ssh_channel::handleChannelConfirm () { ne7ssh_transport *_transport = session->transport; SecureVector<Botan::byte> packet; - _transport->getPacket (packet); + _transport->getPacket (packet); ne7ssh_string channelConfirm (packet, 1); uint32 field; @@ -151,7 +151,7 @@ bool ne7ssh_channel::sendClose () closed = true; return true; } - + bool ne7ssh_channel::sendEof () { ne7ssh_transport *_transport = session->transport; @@ -256,7 +256,7 @@ bool ne7ssh_channel::execCmd (const char* cmd) ne7ssh::errors()->push (session->getSshChannel(), "Remote shell is running. This command cannot be executed."); return false; } - + packet.clear(); packet.addChar (SSH2_MSG_CHANNEL_REQUEST); packet.addInt (session->getSendChannel()); @@ -264,11 +264,11 @@ bool ne7ssh_channel::execCmd (const char* cmd) packet.addChar (0); packet.addString (cmd); - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return false; cmdComplete = false; - return true; + return true; } void ne7ssh_channel::getShell () @@ -306,7 +306,7 @@ void ne7ssh_channel::receive () bool notFirst = false; short status; - if (eof) + if (eof) { return; } @@ -378,7 +378,7 @@ void ne7ssh_channel::write (Botan::SecureVector<Botan::byte>& data) SecureVector<Botan::byte> dataBuff, outBuff, delayedBuff; uint32 len, maxBytes, i, dataStart; - if (delayedBuffer.length()) + if (delayedBuffer.length()) { dataBuff.set (delayedBuffer.value()); delayedBuffer.clear(); diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_channel.h b/src/libs/3rdparty/net7ssh/src/ne7ssh_channel.h index 5cd570fa3c3ad3c4bd60e1124e15c39c70dc7436..6b9d0526c8b7372d8b8c84e1cc155134d27540d2 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_channel.h +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_channel.h @@ -170,7 +170,7 @@ class ne7ssh_channel * Checks if current channel is in an open state. * @return True if channel is open, otherwise false is returned. */ - bool isOpen () { return channelOpened; } + bool isOpen () { return channelOpened; } /** * When closing a channel, initiates the closing procedure. diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_connection.cpp b/src/libs/3rdparty/net7ssh/src/ne7ssh_connection.cpp index 7512e1a3eda9c43087f2a29b44846201d0153443..569eaa44508a9c4dc3af49a194ef3115c423567f 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_connection.cpp +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_connection.cpp @@ -139,7 +139,7 @@ bool ne7ssh_connection::authWithPassword (const char* username, const char* pass if (!transport->sendPacket (packet.value())) return false; _cmd = transport->waitForPacket (0); - if (_cmd == SSH2_MSG_USERAUTH_SUCCESS) + if (_cmd == SSH2_MSG_USERAUTH_SUCCESS) { return true; } @@ -262,7 +262,7 @@ bool ne7ssh_connection::checkRemoteVersion () ne7ssh::errors()->push (session->getSshChannel(), "Remote SSH version is not supported. Remote version: %B.", &remoteVer); return false; } - else + else { _pos = remoteVer.end() - 1; while (*_pos == '\r' || *_pos == '\n') _pos--; @@ -323,7 +323,7 @@ bool ne7ssh_connection::sendClose () bool status; if (channel->isOpen() && !isSftpActive()) return (channel->sendClose ()); else if (getCmdComplete()) cmdClosed=true; - if (isSftpActive()) + if (isSftpActive()) { delete sftp; sftp = 0; diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_connection.h b/src/libs/3rdparty/net7ssh/src/ne7ssh_connection.h index d2544cab2734ce1731f724428ff7b7bfa9bb4033..a201c19262f564252f8bff415a876fdda0faa240 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_connection.h +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_connection.h @@ -162,14 +162,14 @@ class ne7ssh_connection void sendData () { channel->sendAll (); } /** - * - * @param cmd - * @return + * + * @param cmd + * @return */ bool sendCmd (const char* cmd); /** - * This function is used to close the current connection. + * This function is used to close the current connection. *<p>First closes the channel, and then the connection itself. * @return True, if packet sent successfully, otherwise false is returned. */ @@ -192,7 +192,7 @@ class ne7ssh_connection * @return A reference to a buffer containing the last received packet. */ Botan::SecureVector<Botan::byte>& getReceived () { return channel->getReceived(); } - + /** * When executing a single command with ne7ssh::sendCmd this command is used to determine when remote side finishes the xecution. * @return True if execution of the command is complete. Otherwise false. diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_error.cpp b/src/libs/3rdparty/net7ssh/src/ne7ssh_error.cpp index 9d89bc2a5df0ddb63813f6e0728a295bca5ecc2e..46173c75a184f543038644bfb034bd570c14819f 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_error.cpp +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_error.cpp @@ -36,7 +36,7 @@ Ne7sshError::~Ne7sshError() if (ErrorBuffer[i] && ErrorBuffer[i]->errorStr) free (ErrorBuffer[i]->errorStr); free (ErrorBuffer[i]); } - free (ErrorBuffer); + free (ErrorBuffer); } @@ -138,7 +138,7 @@ bool Ne7sshError::push (int32 channel, const char* format, ...) va_end (args); if (!lock()) return false; - if (!memberCount) + if (!memberCount) { ErrorBuffer = (Error**) malloc (sizeof(Error*)); ErrorBuffer[0] = (Error*) malloc (sizeof(Error)); @@ -148,7 +148,7 @@ bool Ne7sshError::push (int32 channel, const char* format, ...) ErrorBuffer = (Error**) realloc (ErrorBuffer, sizeof(Error*) * (memberCount + 1)); ErrorBuffer[memberCount] = (Error*) malloc (sizeof(Error)); } - + ErrorBuffer[memberCount]->channel = channel; ErrorBuffer[memberCount]->errorStr = errStr; memberCount++; @@ -191,7 +191,7 @@ const char* Ne7sshError::pop (int32 channel) memcpy (popedErr, result, len + 1); deleteRecord (recID); } - else + else { unlock(); return 0; diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_kex.cpp b/src/libs/3rdparty/net7ssh/src/ne7ssh_kex.cpp index 6f935eb844c21a1de337791cbf13f5309db98bea..c0bfc413caadc24ebf36590f606141dc5197401b 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_kex.cpp +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_kex.cpp @@ -59,7 +59,7 @@ void ne7ssh_kex::constructLocalKex() { len = strlen (cipher); if (!memcmp (cipher, ne7ssh::PREFERED_CIPHER, len)) Ciphers.append ((Botan::byte*)cipher, (uint32_t) len); - else + else { tmpCiphers.append (','); tmpCiphers.append ((Botan::byte*)cipher, (uint32_t) len); @@ -79,7 +79,7 @@ void ne7ssh_kex::constructLocalKex() { len = strlen (hmac); if (!memcmp (hmac, ne7ssh::PREFERED_MAC, len)) Hmacs.append ((Botan::byte*)hmac, (uint32_t) len); - else + else { tmpMacs.append (','); tmpMacs.append ((Botan::byte*)hmac, (uint32_t) len); @@ -107,7 +107,7 @@ bool ne7ssh_kex::sendInit () { ne7ssh_transport *_transport; - if (!session->transport) + if (!session->transport) { ne7ssh::errors()->push (session->getSshChannel(), "No transport. Cannot initialize key exchange."); return false; @@ -210,7 +210,7 @@ bool ne7ssh_kex::handleInit () } if (!_crypto->negotiatedCmprsS2c (agreed)) return false; - return true; + return true; } bool ne7ssh_kex::sendKexDHInit () diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_keys.cpp b/src/libs/3rdparty/net7ssh/src/ne7ssh_keys.cpp index f4514ae98402798c2d54194c052bff3fbc4e0458..2e20fe57b984023cff81bad48c16c616511745f1 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_keys.cpp +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_keys.cpp @@ -366,7 +366,7 @@ bool ne7ssh_keys::getKeyPairFromFile (const char* privKeyFileName) buffer = (char*) malloc (privKeyStr.length() + 1); memcpy (buffer, (const char*)privKeyStr.value().begin(), privKeyStr.length()); buffer[privKeyStr.length()] = 0x0; - + length = privKeyStr.length(); for (i = pos = 0; i < privKeyStr.length(); i++) @@ -388,7 +388,7 @@ bool ne7ssh_keys::getKeyPairFromFile (const char* privKeyFileName) } buffer[pos] = 0x00; length = pos; - + if ((memcmp (buffer, "-----BEGIN", 10)) || (memcmp (buffer + length - 17, "PRIVATE KEY-----", 16))) { @@ -523,7 +523,7 @@ bool ne7ssh_keys::getRSAKeys (char* buffer, uint32 size) BER_Decoder sequence = decoder.start_cons(SEQUENCE); sequence.decode (version); #endif - + if (version) { ne7ssh::errors()->push (-1, "Encountered unknown RSA key version."); @@ -543,7 +543,7 @@ bool ne7ssh_keys::getRSAKeys (char* buffer, uint32 size) sequence.decode (p); sequence.decode (q); #endif - + sequence.discard_remaining(); sequence.verify_end(); diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_keys.h b/src/libs/3rdparty/net7ssh/src/ne7ssh_keys.h index d29e66002f97501771931886b4d3854a0aa547e1..f62c66f26a1e8d510972cdbaf7a04efbd102ddbe 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_keys.h +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_keys.h @@ -69,7 +69,7 @@ class ne7ssh_keys /** * ne7ssh_keys destructor. - * @return + * @return */ ~ne7ssh_keys(); @@ -94,7 +94,7 @@ class ne7ssh_keys bool generateRSAKeys (const char* fqdn, const char* privKeyFileName, const char* pubKeyFileName, uint16 keySize = 2048); /** - * Extracts key pair from a PEM encoded file. + * Extracts key pair from a PEM encoded file. * <p>Reads the file and determines the type of key, then passes processing to either getDsaKeys() or getRSAKeys(*) functions. * @param privKeyFileName Full path to PEM encoded file. * @return True if key succesfully extracted, otherwise False is returned. diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_session.h b/src/libs/3rdparty/net7ssh/src/ne7ssh_session.h index 13b9094084c7aa3ac98fbded09be53b653bd67a6..ae312c3acfaa15a54e36e94427f5dae79ea52525 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_session.h +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_session.h @@ -71,7 +71,7 @@ class ne7ssh_session * Returns remote SSH version. * @return Reference to a vector containing the version string. */ - Botan::SecureVector<Botan::byte> &getRemoteVersion () { return remoteVersion; } + Botan::SecureVector<Botan::byte> &getRemoteVersion () { return remoteVersion; } /** * Sets SSH session ID, a.k.a. H from the first KEX. diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp.cpp b/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp.cpp index 2028c2523a1e5c8fec7a155b5188eb8386993451..b1521bbd3a6080b7a40a9847a2c92dd3d0d53058 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp.cpp +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp.cpp @@ -71,14 +71,14 @@ bool Ne7sshSftp::init () windowSend -= 9; - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return false; channelOpened = true; status = receiveUntil (SSH2_FXP_VERSION, this->timeout); return status; - + } bool Ne7sshSftp::handleData (Botan::SecureVector<Botan::byte>& packet) @@ -114,7 +114,7 @@ bool Ne7sshSftp::handleData (Botan::SecureVector<Botan::byte>& packet) else commBuffer.clear(); _cmd = mainBuffer.getByte(); - + this->sftpCmd = _cmd; switch (_cmd) { @@ -130,7 +130,7 @@ bool Ne7sshSftp::handleData (Botan::SecureVector<Botan::byte>& packet) case SSH2_FXP_DATA: return handleSftpData (mainBuffer.value()); - + case SSH2_FXP_NAME: return handleNames (mainBuffer.value()); @@ -141,7 +141,7 @@ bool Ne7sshSftp::handleData (Botan::SecureVector<Botan::byte>& packet) ne7ssh::errors()->push (session->getSshChannel(), "Unhandled SFTP subsystem command: %i.", _cmd); return false; } - + return true; } @@ -170,7 +170,7 @@ bool Ne7sshSftp::receiveUntil (short _cmd, uint32 timeSec) this->sftpCmd = 0; commBuffer.clear(); - + while (true) { status = _transport->waitForPacket (0, false); @@ -185,7 +185,7 @@ bool Ne7sshSftp::receiveUntil (short _cmd, uint32 timeSec) prevSize = commBuffer.length(); usleep (10000); - + if (sftpCmd == _cmd) return true; if (!cutoff) continue; if (timeout >= cutoff) break; @@ -204,7 +204,7 @@ bool Ne7sshSftp::receiveWhile (short _cmd, uint32 timeSec) this->sftpCmd = _cmd; commBuffer.clear(); - + while (true) { status = _transport->waitForPacket (0, false); @@ -220,7 +220,7 @@ bool Ne7sshSftp::receiveWhile (short _cmd, uint32 timeSec) prevSize = commBuffer.length(); usleep (10000); - + if (sftpCmd != _cmd) return true; if (!cutoff) continue; @@ -252,12 +252,12 @@ bool Ne7sshSftp::handleStatus (Botan::SecureVector<Botan::byte>& packet) ne7ssh_string sftpBuffer (packet, 0); uint32 requestID, errorID; SecureVector<Botan::byte> errorStr; - + requestID = sftpBuffer.getInt(); errorID = sftpBuffer.getInt(); sftpBuffer.getString (errorStr); - + if (errorID) { lastError = errorID; @@ -288,8 +288,8 @@ bool Ne7sshSftp::addOpenHandle (Botan::SecureVector<Botan::byte>& packet) memcpy (sftpFiles[sftpFilesCount]->handle, handle.begin(), len); sftpFiles[sftpFilesCount]->handleLen = len; sftpFilesCount++; - return true; - + return true; + } bool Ne7sshSftp::handleSftpData (Botan::SecureVector<Botan::byte>& packet) @@ -436,7 +436,7 @@ uint32 Ne7sshSftp::openFile (const char* filename, uint8 shortMode) return 0; } - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return 0; windowSend -= 21 + fullPath.length(); @@ -444,7 +444,7 @@ uint32 Ne7sshSftp::openFile (const char* filename, uint8 shortMode) status = receiveUntil (SSH2_FXP_HANDLE, this->timeout); if (!status) return 0; - else return (seq - 1); + else return (seq - 1); } uint32 Ne7sshSftp::openDir (const char* dirname) @@ -466,7 +466,7 @@ uint32 Ne7sshSftp::openDir (const char* dirname) return 0; } - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return 0; windowSend -= 13 + fullPath.length(); @@ -474,7 +474,7 @@ uint32 Ne7sshSftp::openDir (const char* dirname) status = receiveUntil (SSH2_FXP_HANDLE, this->timeout); if (!status) return 0; - else return (seq - 1); + else return (seq - 1); } bool Ne7sshSftp::readFile (uint32 fileID, uint64 offset) @@ -492,14 +492,14 @@ bool Ne7sshSftp::readFile (uint32 fileID, uint64 offset) packet.addBytes ((Botan::byte*)remoteFile->handle, remoteFile->handleLen); packet.addInt64 (offset); packet.addInt (SFTP_MAX_MSG_SIZE); - + if (!packet.isChannelSet()) { ne7ssh::errors()->push (session->getSshChannel(), "Channel not set in sftp packet class."); return 0; } - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return false; windowSend -= remoteFile->handleLen + 25; @@ -547,10 +547,10 @@ bool Ne7sshSftp::writeFile (uint32 fileID, const uint8* data, uint32 len, uint64 if (sent) packet.clear(); packet.addBytes (data + sent, currentLen); - + if (sent) sendVector = packet.valueFragment(); - else + else sendVector = packet.valueFragment(remoteFile->handleLen + 21 + len); if (!sendVector.size()) return false; @@ -581,23 +581,23 @@ bool Ne7sshSftp::closeFile (uint32 fileID) uint16 i; bool status, match=false; sftpFile *remoteFile = getFileHandle (fileID); - + if (!remoteFile) return false; packet.addChar (SSH2_FXP_CLOSE); packet.addInt (this->seq++); packet.addInt (remoteFile->handleLen); packet.addBytes ((Botan::byte*)remoteFile->handle, remoteFile->handleLen); - + if (!packet.isChannelSet()) { ne7ssh::errors()->push (session->getSshChannel(), "Channel not set in sftp packet class."); return 0; } - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return false; - + windowSend -= remoteFile->handleLen + 13; for (i = 0; i < sftpFilesCount; i++) @@ -621,7 +621,7 @@ ne7ssh_string Ne7sshSftp::getFullPath (const char* filename) Botan::SecureVector<Botan::byte> result; char *buffer = 0; uint32 len, pos, last_char, i = 0; - + if (!filename) return ne7ssh_string(); len = strlen (filename); @@ -646,7 +646,7 @@ ne7ssh_string Ne7sshSftp::getFullPath (const char* filename) if ((buffer[0] != '/') && currentPath) { if (currentPath) len = strlen (this->currentPath); - else + else { free (buffer); return ne7ssh_string(); @@ -696,14 +696,14 @@ bool Ne7sshSftp::getFileStats (const char* remoteFile, bool followSymLinks) packet.addInt (this->seq++); packet.addVectorField (fullPath.value()); packet.addInt (SSH2_FILEXFER_ATTR_SIZE | SSH2_FILEXFER_ATTR_UIDGID | SSH2_FILEXFER_ATTR_PERMISSIONS | SSH2_FILEXFER_ATTR_ACMODTIME); - + if (!packet.isChannelSet()) { ne7ssh::errors()->push (session->getSshChannel(), "Channel not set in sftp packet class."); return 0; } - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return false; windowSend -= 17 + fullPath.length(); @@ -718,20 +718,20 @@ bool Ne7sshSftp::getFStat (uint32 fileID) ne7ssh_transport *_transport = session->transport; bool status; sftpFile *remoteFile = getFileHandle (fileID); - + if (!remoteFile) return false; packet.addChar (SSH2_FXP_FSTAT); packet.addInt (this->seq++); packet.addInt (remoteFile->handleLen); packet.addBytes ((Botan::byte*)remoteFile->handle, remoteFile->handleLen); - + if (!packet.isChannelSet()) { ne7ssh::errors()->push (session->getSshChannel(), "Channel not set in sftp packet class."); return 0; } - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return false; windowSend -= remoteFile->handleLen + 13; @@ -747,7 +747,7 @@ uint64 Ne7sshSftp::getFileSize (uint32 fileID) ne7ssh::errors()->push (session->getSshChannel(), "Failed to get remote file attributes."); return 0; } - + return attrs.size; } @@ -760,7 +760,7 @@ bool Ne7sshSftp::getFileAttrs (Ne7SftpSubsystem::fileAttrs& attributes, const ch } ne7ssh_string fullPath = getFullPath (remoteFile); if (!fullPath.length()) return false; - + if (!getFileStats ((const char*)fullPath.value().begin())) { ne7ssh::errors()->push (session->getSshChannel(), "Failed to get remote file attributes."); @@ -805,13 +805,13 @@ bool Ne7sshSftp::isType (const char* remoteFile, uint32 type) } ne7ssh_string fullPath = getFullPath (remoteFile); if (!fullPath.length()) return false; - + if (!getFileStats ((const char*)fullPath.value().begin())) { ne7ssh::errors()->push (session->getSshChannel(), "Failed to get remote file attributes."); return false; } - + perms = attrs.permissions; if (perms & type) return true; else return false; @@ -833,7 +833,7 @@ bool Ne7sshSftp::get (const char* remoteFile, FILE* localFile) uint64 offset = 0; Botan::SecureVector<Botan::byte> localBuffer; uint32 fileID; - + if (!localFile) { ne7ssh::errors()->push (session->getSshChannel(), "Invalid local or remote file."); @@ -841,9 +841,9 @@ bool Ne7sshSftp::get (const char* remoteFile, FILE* localFile) } fileID = openFile (remoteFile, READ); - + if (!fileID) return false; - + size = getFileSize (fileID); if (!size) @@ -866,7 +866,7 @@ bool Ne7sshSftp::get (const char* remoteFile, FILE* localFile) } offset += localBuffer.size(); } - + if (!closeFile (fileID)) return false; return true; @@ -880,7 +880,7 @@ bool Ne7sshSftp::put (FILE* localFile, const char* remoteFile) uint32 fileID; uint8* buffer = 0; uint32 len; - + if (!localFile || !remoteFile) { ne7ssh::errors()->push (session->getSshChannel(), "Invalid local or remote file."); @@ -888,9 +888,9 @@ bool Ne7sshSftp::put (FILE* localFile, const char* remoteFile) } fileID = openFile (remoteFile, OVERWRITE); - + if (!fileID) return false; - + fseek (localFile, 0L, SEEK_END); size = ftell (localFile); rewind (localFile); @@ -905,7 +905,7 @@ bool Ne7sshSftp::put (FILE* localFile, const char* remoteFile) while (size > offset) { len = (size - offset) < SFTP_MAX_MSG_SIZE - 384 ? (size - offset) : SFTP_MAX_MSG_SIZE - 384; - + if (!fread (buffer, len, 1, localFile)) { ne7ssh::errors()->push (session->getSshChannel(), "Could not read from local file. Remote file ID %i.", fileID); @@ -919,7 +919,7 @@ bool Ne7sshSftp::put (FILE* localFile, const char* remoteFile) } offset += len; } - + if (buffer) free (buffer); if (!closeFile (fileID)) return false; return true; @@ -935,18 +935,18 @@ bool Ne7sshSftp::rm (const char* remoteFile) ne7ssh_string fullPath = getFullPath (remoteFile); if (!fullPath.length()) return false; - + packet.addChar (SSH2_FXP_REMOVE); packet.addInt (this->seq++); packet.addVectorField (fullPath.value()); - + if (!packet.isChannelSet()) { ne7ssh::errors()->push (session->getSshChannel(), "Channel not set in sftp packet class."); return false; } - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return false; windowSend -= 13 + fullPath.length(); @@ -970,14 +970,14 @@ bool Ne7sshSftp::mv (const char* oldFile, const char* newFile) packet.addInt (this->seq++); packet.addVectorField (oldPath.value()); packet.addVectorField (newPath.value()); - + if (!packet.isChannelSet()) { ne7ssh::errors()->push (session->getSshChannel(), "Channel not set in sftp packet class."); return 0; } - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return false; windowSend -= oldPath.length() + newPath.length() + 17; @@ -1000,14 +1000,14 @@ bool Ne7sshSftp::mkdir (const char* remoteDir) packet.addInt (this->seq++); packet.addVectorField (fullPath.value()); packet.addInt (0); - + if (!packet.isChannelSet()) { ne7ssh::errors()->push (session->getSshChannel(), "Channel not set in sftp packet class."); return 0; } - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return false; windowSend -= fullPath.length() + 17; @@ -1029,14 +1029,14 @@ bool Ne7sshSftp::rmdir (const char* remoteDir) packet.addChar (SSH2_FXP_RMDIR); packet.addInt (this->seq++); packet.addVectorField (fullPath.value()); - + if (!packet.isChannelSet()) { ne7ssh::errors()->push (session->getSshChannel(), "Channel not set in sftp packet class."); return 0; } - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return false; windowSend -= fullPath.length() + 13; @@ -1057,7 +1057,7 @@ const char* Ne7sshSftp::ls (const char* remoteDir, bool longNames) if (!remoteDir) return 0; fileID = openDir (remoteDir); - + if (!fileID) return 0; remoteFile = getFileHandle (fileID); if (!remoteFile) return 0; @@ -1070,14 +1070,14 @@ const char* Ne7sshSftp::ls (const char* remoteDir, bool longNames) packet.addInt (this->seq++); packet.addInt (remoteFile->handleLen); packet.addBytes ((Botan::byte*)remoteFile->handle, remoteFile->handleLen); - + if (!packet.isChannelSet()) { ne7ssh::errors()->push (session->getSshChannel(), "Channel not set in sftp packet class."); return 0; } - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return 0; windowSend -= remoteFile->handleLen + 13; @@ -1085,7 +1085,7 @@ const char* Ne7sshSftp::ls (const char* remoteDir, bool longNames) status = receiveWhile (SSH2_FXP_NAME, this->timeout); } if (lastError > 1) return 0; - + packet.clear(); packet.addVector (fileBuffer); fileCount = packet.getInt(); @@ -1123,18 +1123,18 @@ bool Ne7sshSftp::cd (const char* remoteDir) packet.addChar (SSH2_FXP_REALPATH); packet.addInt (this->seq++); packet.addVectorField (fullPath.value()); - + if (!packet.isChannelSet()) { ne7ssh::errors()->push (session->getSshChannel(), "Channel not set in sftp packet class."); return false; } - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return false; windowSend -= fullPath.length() + 13; - + status = receiveWhile (SSH2_FXP_NAME, this->timeout); if (!status) { @@ -1183,9 +1183,9 @@ bool Ne7sshSftp::chmod (const char* remoteFile, const char* mode) { if (!isdigit (mode[i])) break; } - + if (i != len) _pos = mode; - else + else { memcpy (converter + (5 - len), mode, len); octet = strtol (converter, (char**)&_pos, 8); @@ -1233,7 +1233,7 @@ bool Ne7sshSftp::chmod (const char* remoteFile, const char* mode) } _pos++; } - + if (*_pos == '+') plus = true; _pos++; while (*_pos && *_pos != ',') @@ -1300,21 +1300,21 @@ bool Ne7sshSftp::chmod (const char* remoteFile, const char* mode) } } } - + packet.addChar (SSH2_FXP_SETSTAT); packet.addInt (this->seq++); packet.addVectorField (fullPath.value()); packet.addInt (SSH2_FILEXFER_ATTR_PERMISSIONS); packet.addInt (perms); - + if (!packet.isChannelSet()) { ne7ssh::errors()->push (session->getSshChannel(), "Channel not set in sftp packet class."); return 0; } - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return false; windowSend -= fullPath.length() + 21; @@ -1348,14 +1348,14 @@ bool Ne7sshSftp::chown (const char* remoteFile, uint32 uid, uint32 gid) else packet.addInt (old_uid); if (gid) packet.addInt (gid); else packet.addInt (old_gid); - + if (!packet.isChannelSet()) { ne7ssh::errors()->push (session->getSshChannel(), "Channel not set in sftp packet class."); return false; } - if (!_transport->sendPacket (packet.value())) + if (!_transport->sendPacket (packet.value())) return false; windowSend -= fullPath.length() + 25; diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp.h b/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp.h index 1f9a2ce80e80210ec81b496d1059cee8e5e937c0..64074401b3ecb9ff4ad974e5a638d943e82e13b2 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp.h +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp.h @@ -135,7 +135,7 @@ class Ne7sshSftp : public ne7ssh_channel /** * Structure used to store open rmote file. */ - typedef struct + typedef struct { uint32 fileID; uint16 handleLen; @@ -358,7 +358,7 @@ class Ne7sshSftp : public ne7ssh_channel /** - * This method is used to retrieve a remote file and dump it into local file. + * This method is used to retrieve a remote file and dump it into local file. * @param remoteFile Full or relative path to the file on the remote side. * @param localFile Pointer to the FILE structure. If the file being retrieved is binary, use "w+" attributes in fopen function. * @return True if getting the file is succeeds. False on any error. diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp_packet.cpp b/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp_packet.cpp index f23b8d4628f25b11919790fa93ef415993067c3c..e926fe57aa66bed4b5f900f63ba333bfe2aaeb15 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp_packet.cpp +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp_packet.cpp @@ -44,12 +44,12 @@ Botan::SecureVector<Botan::byte> &Ne7sshSftpPacket::value () buffer.destroy(); return buffer; } - + tmpVar.addChar (SSH2_MSG_CHANNEL_DATA); tmpVar.addInt (channel); tmpVar.addInt (sizeof(uint32) + buffer.size()); tmpVar.addVectorField (buffer); - + buffer.swap (tmpVar.value()); return buffer; } @@ -63,7 +63,7 @@ Botan::SecureVector<Botan::byte> Ne7sshSftpPacket::valueFragment (uint32 len) buffer.destroy(); return Botan::SecureVector<Botan::byte>(); } - + tmpVar.addChar (SSH2_MSG_CHANNEL_DATA); tmpVar.addInt (channel); if (len) @@ -73,14 +73,14 @@ Botan::SecureVector<Botan::byte> Ne7sshSftpPacket::valueFragment (uint32 len) tmpVar.addVector (buffer); } else tmpVar.addVectorField (buffer); - + return Botan::SecureVector<Botan::byte> (tmpVar.value()); } void Ne7sshSftpPacket::addInt64 (const uint64 var) { uint8 converter[8]; - + converter[0] = (uint8) (var >> 56); converter[1] = (uint8) (var >> 48); converter[2] = (uint8) (var >> 40); @@ -115,9 +115,9 @@ uint64 Ne7sshSftpPacket::getInt64 () } bool Ne7sshSftpPacket::isChannelSet () -{ +{ if (this->channel == -1) return false; - else return true; + else return true; } diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp_packet.h b/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp_packet.h index 8cdb4fbc0c56079bc4cfcbdf2457da8a983657fb..ab7408e5bc11de00d7cc3fdcef9ad2384f3ef319 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp_packet.h +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_sftp_packet.h @@ -46,7 +46,7 @@ class Ne7sshSftpPacket : public ne7ssh_string * @param position Offset. */ Ne7sshSftpPacket(Botan::SecureVector<Botan::byte>& var, uint32 position); - + /** * Default destructor. */ diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_string.cpp b/src/libs/3rdparty/net7ssh/src/ne7ssh_string.cpp index 060151ee75bcf4a4dc952e72ca7acf6becc86182..a5982d9a5bbc8e6fd1852d2ae550c4cd370fd374 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_string.cpp +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_string.cpp @@ -41,7 +41,7 @@ ne7ssh_string::ne7ssh_string(const char* var, uint32 position) : positions(0), p ne7ssh_string::~ne7ssh_string() { - if (positions) + if (positions) free (positions); } diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_string.h b/src/libs/3rdparty/net7ssh/src/ne7ssh_string.h index 780b1cb80838c4ae8a871cb26a392b58aaa3aca5..1829fb486827a653adcbaeaaa1faa99c5875f68e 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_string.h +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_string.h @@ -19,7 +19,7 @@ #include "ne7ssh_types.h" #include <botan/bigint.h> - + /** @author Andrew Useckas */ @@ -66,7 +66,7 @@ public: void clear() { buffer.destroy(); } /** - * Adds a string to the buffer. + * Adds a string to the buffer. * <p>Adds an integer representing the length of the string, converted to the network format, before the actual string data. * Required by SSH protocol specifications. * @param str pointer to a string. @@ -94,7 +94,7 @@ public: void addVector (Botan::SecureVector<Botan::byte>& secvec); /** - * Adds a vector to the buffer. + * Adds a vector to the buffer. * <p>Adds an integer representing the length of the vector, converted to the network format, before the actual data. * Required by SSH protocol specifications. * @param vector Reference to a vector. @@ -108,7 +108,7 @@ public: void addChar (const char ch); /** - * Adds a single integer to the buffer. + * Adds a single integer to the buffer. *<p>Integer is converted to network format as required by SSH protocol specifications. * @param var a single integer. */ diff --git a/src/libs/3rdparty/net7ssh/src/ne7ssh_transport.cpp b/src/libs/3rdparty/net7ssh/src/ne7ssh_transport.cpp index ef641a64fc464690a74d40ac081abcf05cfb1e25..d9fc5da40fb13b0ced5fd203911627d30f7e9074 100644 --- a/src/libs/3rdparty/net7ssh/src/ne7ssh_transport.cpp +++ b/src/libs/3rdparty/net7ssh/src/ne7ssh_transport.cpp @@ -91,23 +91,23 @@ SOCKET ne7ssh_transport::establish (const char *host, uint32 port, int timeout) } else { - if (!NoBlock (sock, true)) + if (!NoBlock (sock, true)) return -1; - + if (connect (sock, (struct sockaddr*) &remoteAddr, sizeof(remoteAddr)) == -1) { fd_set rfds; struct timeval waitTime; - + waitTime.tv_sec = timeout; waitTime.tv_usec = 0; - + FD_ZERO(&rfds); FD_SET(sock, &rfds); - + int status; status = select(sock+1, &rfds, NULL, NULL, &waitTime); - + if ( status == 0 ) { if ( ! FD_ISSET(sock, &rfds) ) @@ -196,7 +196,7 @@ bool ne7ssh_transport::send (Botan::SecureVector<Botan::byte>& buffer) { size_t byteCount; uint32 sent = 0; - + if (buffer.size() > MAX_PACKET_LEN) { ne7ssh::errors()->push (((ne7ssh_session*)session)->getSshChannel(), "Cannot send. Packet too large for the transport layer."); @@ -221,7 +221,7 @@ bool ne7ssh_transport::receive (Botan::SecureVector<Botan::byte>& buffer, bool a Botan::byte in_buffer[MAX_PACKET_LEN]; int len; - if (wait(sock, 0)) + if (wait(sock, 0)) len = ::recv (sock, (char*) in_buffer, MAX_PACKET_LEN, 0); if (!len) @@ -313,7 +313,7 @@ short ne7ssh_transport::waitForPacket (Botan::byte cmd, bool bufferOnly) } else*/ tmpVar.set (in); - + if (!tmpVar.is_empty()) { if (_crypto->isInited()) @@ -336,7 +336,7 @@ short ne7ssh_transport::waitForPacket (Botan::byte cmd, bool bufferOnly) if (!in.is_empty()) _crypto->decryptPacket (tmpVar, in, _crypto->getDecryptBlock()); else tmpVar.destroy(); } - else + else { while (in.size() < 4) if (!receive(in, true)) return -1; @@ -392,7 +392,7 @@ short ne7ssh_transport::waitForPacket (Botan::byte cmd, bool bufferOnly) if (rSeq == MAX_SEQUENCE) seq = 0; else rSeq++; _cmd = *(decrypted.begin() + 5); - + if (cmd == _cmd || !cmd) { inBuffer.set (decrypted); @@ -428,7 +428,7 @@ uint32 ne7ssh_transport::getPacket (Botan::SecureVector<Botan::byte> &result) if (len > tmpVector.size()) len -= macLen; } - tmpVector.append ((uint8*)"\0", 1); + tmpVector.append ((uint8*)"\0", 1); result.set (tmpVector.begin() + 5, len); _crypto->decompressData (result); diff --git a/src/libs/3rdparty/net7ssh/src/src.pro b/src/libs/3rdparty/net7ssh/src/src.pro index ee83b8e8cdd49b3d8ad2bb59fc19a765bac7f4c9..a0feafc4ae1c88cdf7cc8a8f5d881e227c61025e 100644 --- a/src/libs/3rdparty/net7ssh/src/src.pro +++ b/src/libs/3rdparty/net7ssh/src/src.pro @@ -13,7 +13,7 @@ LIBS += -l$$qtLibraryTarget(Botan) win32 { LIBS += -lWs2_32 win32-msvc*: QMAKE_CXXFLAGS += -wd4250 -wd4251 -wd4290 - + DEFINES += _CRT_SECURE_NO_WARNINGS DEFINES += NE7SSH_EXPORTS=1 _WINDLL _USRDLL _CONSOLE _WINDOWS } diff --git a/src/libs/cplusplus/PreprocessorClient.cpp b/src/libs/cplusplus/PreprocessorClient.cpp index 5b57baa7b2eb0a65863f5f70d42ab86983b73ba9..89dfcd4b062137907faeef779fac2e9919f63787 100644 --- a/src/libs/cplusplus/PreprocessorClient.cpp +++ b/src/libs/cplusplus/PreprocessorClient.cpp @@ -62,10 +62,10 @@ using namespace CPlusPlus; /*! \fn void Client::startExpandingMacro(unsigned offset, const Macro ¯o, const QByteArray &originalText, bool inCondition = false, const QVector<MacroArgumentReference> &actuals = QVector<MacroArgumentReference>()) - + Called when starting to expand a macro. The parameter \a inCondition indicates whether the expansion is happening inside a preprocessor conditional. - + \sa stopExpandingMacro() */ diff --git a/src/libs/cplusplus/ResolveExpression.cpp b/src/libs/cplusplus/ResolveExpression.cpp index 5d934707ea94d4e8e90b0dcf090d066d840572d4..fe06d3dabfa81205e855156d7895bfc327196c3c 100644 --- a/src/libs/cplusplus/ResolveExpression.cpp +++ b/src/libs/cplusplus/ResolveExpression.cpp @@ -473,7 +473,7 @@ bool ResolveExpression::visit(CallAST *ast) } } - } else if (Function *funTy = ty->asFunctionType()) { + } else if (Function *funTy = ty->asFunctionType()) { if (maybeValidPrototype(funTy, actualArgumentCount)) addResult(funTy->returnType().simplified(), lastVisibleSymbol); @@ -597,7 +597,7 @@ ResolveExpression::resolveBaseExpression(const QList<LookupItem> &baseResults, i const Name *arrowAccessOp = control()->operatorNameId(OperatorNameId::ArrowOp); const QList<Symbol *> candidates = resolveClass(namedTy->name(), result, _context); - foreach (Symbol *classObject, candidates) { + foreach (Symbol *classObject, candidates) { const QList<LookupItem> overloads = resolveMember(arrowAccessOp, classObject->asClass(), namedTy->name()); @@ -715,16 +715,16 @@ ResolveExpression::resolveMember(const Name *memberName, Class *klass, foreach (Symbol *candidate, candidates) { FullySpecifiedType ty = candidate->type(); const Name *unqualifiedNameId = className; - + if (const QualifiedNameId *q = className->asQualifiedNameId()) unqualifiedNameId = q->unqualifiedNameId(); - + if (const TemplateNameId *templId = unqualifiedNameId->asTemplateNameId()) { GenTemplateInstance::Substitution subst; - + for (unsigned i = 0; i < templId->templateArgumentCount(); ++i) { FullySpecifiedType templArgTy = templId->templateArgumentAt(i); - + if (i < klass->templateParameterCount()) { const Name *templArgName = klass->templateParameterAt(i)->name(); if (templArgName && templArgName->identifier()) { @@ -733,11 +733,11 @@ ResolveExpression::resolveMember(const Name *memberName, Class *klass, } } } - + GenTemplateInstance inst(_context, subst); ty = inst(candidate); } - + results.append(LookupItem(ty, candidate)); } diff --git a/src/libs/extensionsystem/optionsparser.h b/src/libs/extensionsystem/optionsparser.h index 377d94ca975a3abde45bb06b10d04e3e67654311..435ea956a2ee316c6f699838142e0554e2c48342 100644 --- a/src/libs/extensionsystem/optionsparser.h +++ b/src/libs/extensionsystem/optionsparser.h @@ -46,7 +46,7 @@ public: QMap<QString, QString> *foundAppOptions, QString *errorString, PluginManagerPrivate *pmPrivate); - + bool parse(); static const char *NO_LOAD_OPTION; @@ -63,13 +63,13 @@ private: enum TokenType { OptionalToken, RequiredToken }; bool nextToken(TokenType type = OptionalToken); - + const QStringList &m_args; const QMap<QString, bool> &m_appOptions; QMap<QString, QString> *m_foundAppOptions; QString *m_errorString; PluginManagerPrivate *m_pmPrivate; - + // state QString m_currentArg; QStringList::const_iterator m_it; diff --git a/src/libs/extensionsystem/plugindetailsview.h b/src/libs/extensionsystem/plugindetailsview.h index b8d36ebd493c52ef2a42d05beeca1386954aeeb6..a0fd41a1a1fad552911924fd4f4e00ff1b196fc5 100644 --- a/src/libs/extensionsystem/plugindetailsview.h +++ b/src/libs/extensionsystem/plugindetailsview.h @@ -52,7 +52,7 @@ class EXTENSIONSYSTEM_EXPORT PluginDetailsView : public QWidget public: PluginDetailsView(QWidget *parent = 0); ~PluginDetailsView(); - + void update(PluginSpec *spec); private: diff --git a/src/libs/extensionsystem/pluginmanager.cpp b/src/libs/extensionsystem/pluginmanager.cpp index 6d2be40413b97218b8c54038c25510bb30600a75..ffa7873f5e3d2f3abfe1bf6238d0714633a1a866 100644 --- a/src/libs/extensionsystem/pluginmanager.cpp +++ b/src/libs/extensionsystem/pluginmanager.cpp @@ -413,12 +413,12 @@ void PluginManager::remoteArguments(const QString &serializedArgument) The caller (the application) may register itself for options via the \a appOptions list, containing pairs of "option string" and a bool that indicates if the option requires an argument. Application options always override any plugin's options. - + \a foundAppOptions is set to pairs of ("option string", "argument") for any application options that were found. The command line options that were not processed can be retrieved via the arguments() method. If an error occurred (like missing argument for an option that requires one), \a errorString contains a descriptive message of the error. - + Returns if there was an error. */ bool PluginManager::parseOptions(const QStringList &args, diff --git a/src/libs/extensionsystem/pluginview.cpp b/src/libs/extensionsystem/pluginview.cpp index fa595cdac8c45cb377bc9717b538fee58c29ea41..2ac3dec9feb4abc39959101a6e31ae64bb1d77d7 100644 --- a/src/libs/extensionsystem/pluginview.cpp +++ b/src/libs/extensionsystem/pluginview.cpp @@ -72,7 +72,7 @@ Q_DECLARE_METATYPE(ExtensionSystem::PluginSpec*); given plugin \a manager with a given \a parent widget. */ PluginView::PluginView(PluginManager *manager, QWidget *parent) - : QWidget(parent), + : QWidget(parent), m_ui(new Internal::Ui::PluginView), p(new Internal::PluginViewPrivate) { diff --git a/src/libs/libs.pro b/src/libs/libs.pro index 15d97c0c4e878b1db2c6d7b29892b5bf6af0161a..085d7a0a6a91f57c3f6c60807cf6708a8ad221ab 100644 --- a/src/libs/libs.pro +++ b/src/libs/libs.pro @@ -9,7 +9,7 @@ SUBDIRS = \ utils/process_stub.pro \ cplusplus \ qmljs - + SUPPORT_QT_MAEMO = $$(QTCREATOR_WITH_MAEMO) !isEmpty(SUPPORT_QT_MAEMO) { SUBDIRS += 3rdparty diff --git a/src/libs/qmljs/qmljsinterpreter.h b/src/libs/qmljs/qmljsinterpreter.h index ee91c22b38c430e60dde3ffa843026b601e480bb..54251a87ff372c55c249e71d1937448e021f2c07 100644 --- a/src/libs/qmljs/qmljsinterpreter.h +++ b/src/libs/qmljs/qmljsinterpreter.h @@ -343,7 +343,7 @@ public: Function(Engine *engine); virtual ~Function(); - void addArgument(const Value *argument); + void addArgument(const Value *argument); void setReturnValue(const Value *returnValue); // ObjectValue interface diff --git a/src/libs/utils/abstractprocess_win.cpp b/src/libs/utils/abstractprocess_win.cpp index 70aa028e1cb1fe9ec1fd5bea926058c3994f94e1..a4fce52cf5a8db8ab580806e1105112af347733c 100644 --- a/src/libs/utils/abstractprocess_win.cpp +++ b/src/libs/utils/abstractprocess_win.cpp @@ -31,7 +31,7 @@ #include <windows.h> -namespace Utils { +namespace Utils { QStringList AbstractProcess::fixWinEnvironment(const QStringList &env) { diff --git a/src/libs/utils/filterlineedit.cpp b/src/libs/utils/filterlineedit.cpp index 55fce68267fcc7b1beaa4f1fdddf5963ae92a664..8431562d33a12fe98e34ff944380e7e9338d1dcb 100644 --- a/src/libs/utils/filterlineedit.cpp +++ b/src/libs/utils/filterlineedit.cpp @@ -35,7 +35,7 @@ FilterLineEdit::FilterLineEdit(QWidget *parent) : FancyLineEdit(parent), m_lastFilterText(typedText()) { - setSide(Utils::FancyLineEdit::Right); + setSide(Utils::FancyLineEdit::Right); setPixmap(QPixmap(QLatin1String(":/utils/images/reset.png"))); setHintText(tr("Type to filter")); diff --git a/src/libs/utils/projectintropage.h b/src/libs/utils/projectintropage.h index 0ebd427239f21a02849567f9bf1796b0f87508e5..cc23bd52ed2877df9b811417d11ce8ef4b241235 100644 --- a/src/libs/utils/projectintropage.h +++ b/src/libs/utils/projectintropage.h @@ -71,7 +71,7 @@ public: // Insert an additional control into the form layout for the target. void insertControl(int row, QWidget *label, QWidget *control); - virtual bool isComplete() const; + virtual bool isComplete() const; // Validate a project directory name entry field static bool validateProjectDirectory(const QString &name, QString *errorMessage); diff --git a/src/libs/utils/savedaction.cpp b/src/libs/utils/savedaction.cpp index a4b94bcd7bcf585ea29484544ee9342d27c4c323..239bc3e898118d5791b8e39b7bc5a88eb03ae5f9 100644 --- a/src/libs/utils/savedaction.cpp +++ b/src/libs/utils/savedaction.cpp @@ -56,7 +56,7 @@ using namespace Utils; /*! \class Utils::SavedAction - + \brief The SavedAction class is a helper class for actions with persistent state. @@ -234,7 +234,7 @@ QAction *SavedAction::updatedAction(const QString &text0) } /* - Uses \c settingsGroup() and \c settingsKey() to restore the + Uses \c settingsGroup() and \c settingsKey() to restore the item from \a settings, \sa settingsKey(), settingsGroup(), writeSettings() @@ -253,7 +253,7 @@ void SavedAction::readSettings(const QSettings *settings) } /* - Uses \c settingsGroup() and \c settingsKey() to write the + Uses \c settingsGroup() and \c settingsKey() to write the item to \a settings, \sa settingsKey(), settingsGroup(), readSettings() @@ -267,12 +267,12 @@ void SavedAction::writeSettings(QSettings *settings) //qDebug() << "WRITING: " << m_settingsKey << " -> " << toString(); settings->endGroup(); } - + /* A \c SavedAction can be connected to a widget, typically a checkbox, radiobutton, or a lineedit in some configuration dialog. - The widget will retrieve its contents from the SavedAction's + The widget will retrieve its contents from the SavedAction's value, and - depending on the \a ApplyMode - either write changes back immediately, or when \s SavedAction::apply() is called explicitly. @@ -285,7 +285,7 @@ void SavedAction::connectWidget(QWidget *widget, ApplyMode applyMode) qDebug() << "ALREADY CONNECTED: " << widget << m_widget << toString(); return); m_widget = widget; m_applyMode = applyMode; - + if (QAbstractButton *button = qobject_cast<QAbstractButton *>(widget)) { if (button->isCheckable()) { button->setChecked(m_value.toBool()); @@ -297,14 +297,14 @@ void SavedAction::connectWidget(QWidget *widget, ApplyMode applyMode) } } else if (QSpinBox *spinBox = qobject_cast<QSpinBox *>(widget)) { spinBox->setValue(m_value.toInt()); - //qDebug() << "SETTING VALUE" << spinBox->value(); + //qDebug() << "SETTING VALUE" << spinBox->value(); connect(spinBox, SIGNAL(valueChanged(int)), this, SLOT(spinBoxValueChanged(int))); connect(spinBox, SIGNAL(valueChanged(QString)), this, SLOT(spinBoxValueChanged(QString))); } else if (QLineEdit *lineEdit = qobject_cast<QLineEdit *>(widget)) { lineEdit->setText(m_value.toString()); - //qDebug() << "SETTING TEXT" << lineEdit->text(); + //qDebug() << "SETTING TEXT" << lineEdit->text(); connect(lineEdit, SIGNAL(editingFinished()), this, SLOT(lineEditEditingFinished())); } else if (PathChooser *pathChooser = qobject_cast<PathChooser *>(widget)) { diff --git a/src/libs/utils/savedaction.h b/src/libs/utils/savedaction.h index abfb8d14377cbb40d84b891e49f31ad59f1ce8f2..404fa81ea74183cfe159a64e4335fb20bafe3707 100644 --- a/src/libs/utils/savedaction.h +++ b/src/libs/utils/savedaction.h @@ -72,7 +72,7 @@ public: virtual void readSettings(const QSettings *settings); Q_SLOT virtual void writeSettings(QSettings *settings); - + virtual void connectWidget(QWidget *widget, ApplyMode applyMode = DeferedApply); virtual void disconnectWidget(); Q_SLOT virtual void apply(QSettings *settings); diff --git a/src/libs/utils/submiteditorwidget.cpp b/src/libs/utils/submiteditorwidget.cpp index 69b94f61f147d5742ed90a414aeb4547b15e2b81..3d146eeff556740023f7b78e1ac9153817480fe4 100644 --- a/src/libs/utils/submiteditorwidget.cpp +++ b/src/libs/utils/submiteditorwidget.cpp @@ -244,7 +244,7 @@ static QString wrappedText(const QTextEdit *e) const QChar newLine = QLatin1Char('\n'); QString rc; QTextCursor cursor(e->document()); - cursor.movePosition(QTextCursor::Start); + cursor.movePosition(QTextCursor::Start); while (!cursor.atEnd()) { cursor.select(QTextCursor::LineUnderCursor); rc += cursor.selectedText(); @@ -280,7 +280,7 @@ void SubmitEditorWidget::setLineWrap(bool v) qDebug() << Q_FUNC_INFO << v; if (v) { m_d->m_ui.description->setLineWrapColumnOrWidth(m_d->m_lineWidth); - m_d->m_ui.description->setLineWrapMode(QTextEdit::FixedColumnWidth); + m_d->m_ui.description->setLineWrapMode(QTextEdit::FixedColumnWidth); } else { m_d->m_ui.description->setLineWrapMode(QTextEdit::NoWrap); } @@ -496,7 +496,7 @@ void SubmitEditorWidget::insertDescriptionEditContextMenuAction(int pos, QAction void SubmitEditorWidget::editorCustomContextMenuRequested(const QPoint &pos) { - QMenu *menu = m_d->m_ui.description->createStandardContextMenu(); + QMenu *menu = m_d->m_ui.description->createStandardContextMenu(); // Extend foreach (const SubmitEditorWidgetPrivate::AdditionalContextMenuAction &a, m_d->descriptionEditContextMenuActions) { if (a.second) { diff --git a/src/libs/utils/submitfieldwidget.cpp b/src/libs/utils/submitfieldwidget.cpp index 7b1e34ca2ba4abb4f5cc8edc17d0270f08163845..91e7248de9554d10fb529af2aeb70a2772f4cc4d 100644 --- a/src/libs/utils/submitfieldwidget.cpp +++ b/src/libs/utils/submitfieldwidget.cpp @@ -104,7 +104,7 @@ void FieldEntry::deleteGuiLater() clearButton->deleteLater(); browseButton->deleteLater(); toolBar->deleteLater(); - lineEdit->deleteLater(); + lineEdit->deleteLater(); combo->deleteLater(); layout->deleteLater(); } @@ -193,7 +193,7 @@ void SubmitFieldWidget::setFields(const QStringList & f) { // remove old fields for (int i = m_d->fieldEntries.size() - 1 ; i >= 0 ; i--) - removeField(i); + removeField(i); m_d->fields = f; if (!f.empty()) diff --git a/src/libs/utils/utils.pro b/src/libs/utils/utils.pro index 2c823cfd621c5b851eeec93f54ab8f1d7962f9c8..3a99ecce8ddb8a31f6792102ac3ba3f5a0e46849 100644 --- a/src/libs/utils/utils.pro +++ b/src/libs/utils/utils.pro @@ -39,7 +39,7 @@ SOURCES += reloadpromptutils.cpp \ detailswidget.cpp \ changeset.cpp \ filterlineedit.cpp -win32 { +win32 { SOURCES += abstractprocess_win.cpp \ consoleprocess_win.cpp \ winutils.cpp diff --git a/src/libs/utils/winutils.cpp b/src/libs/utils/winutils.cpp index ecb5b389f5762b45c78e5163c0b3407bc483df82..60b185bc06f769595dc9e76c7dd85da5ba7f7e1b 100644 --- a/src/libs/utils/winutils.cpp +++ b/src/libs/utils/winutils.cpp @@ -109,7 +109,7 @@ QTCREATOR_UTILS_EXPORT QString winGetDLLVersion(WinDLLVersionType t, if (!(*verQueryValueW)(data, TEXT("\\"), &versionInfo, &len)) { *errorMessage = QString::fromLatin1("Unable to determine version string of %1: %2").arg(name, winErrorMessage(GetLastError())); return QString(); - } + } QString rc; switch (t) { case WinDLLFileVersion: diff --git a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp index ffa6399d0e68c5023ef52dd53742d52d6e99f7c7..1aeddf472295d327637acbb5eb2c06a821a8acdd 100644 --- a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp @@ -369,7 +369,7 @@ void CMakeRunPage::initializePage() } } } - } + } m_generatorComboBox->clear(); // Find out whether we have multiple msvc versions QStringList msvcVersions = ProjectExplorer::ToolChain::availableMSVCVersions(); @@ -419,7 +419,7 @@ void CMakeRunPage::runCMake() } else { m_cmakeWizard->setMsvcVersion(""); } - } + } } #else // Q_OS_WIN QString generator = QLatin1String("-GCodeBlocks - Unix Makefiles"); diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp index 68fcaf0b0ba4963040f2fd0d9f132893cc99b069..f85fa199b603468674223ba40369eb8f75fc5709 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp @@ -53,7 +53,7 @@ CMakeManager::CMakeManager(CMakeSettingsPage *cmakeSettingsPage) { Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance(); m_projectContext = uidm->uniqueIdentifier(CMakeProjectManager::Constants::PROJECTCONTEXT); - m_projectLanguage = uidm->uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX); + m_projectLanguage = uidm->uniqueIdentifier(ProjectExplorer::Constants::LANG_CXX); } int CMakeManager::projectContext() const @@ -117,7 +117,7 @@ void CMakeManager::createXmlFile(QProcess *proc, const QStringList &arguments, c proc->setProcessChannelMode(QProcess::MergedChannels); proc->setEnvironment(env.toStringList()); - const QString srcdir = buildDirectory.exists(QLatin1String("CMakeCache.txt")) ? QString(QLatin1Char('.')) : sourceDirectory; + const QString srcdir = buildDirectory.exists(QLatin1String("CMakeCache.txt")) ? QString(QLatin1Char('.')) : sourceDirectory; proc->start(cmakeExecutable(), QStringList() << srcdir << arguments << generator); } diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.pro b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.pro index fd898b76754f7ec2126d248a57ac3e5a982061ae..755e3f99f504fa1fedf523bcf96939b739aabe94 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.pro +++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.pro @@ -22,6 +22,6 @@ SOURCES = cmakeproject.cpp \ cmakebuildenvironmentwidget.cpp \ cmakebuildconfiguration.cpp RESOURCES += cmakeproject.qrc -FORMS += +FORMS += OTHER_FILES += CMakeProjectManager.pluginspec diff --git a/src/plugins/coreplugin/actionmanager/commandsfile.h b/src/plugins/coreplugin/actionmanager/commandsfile.h index 8cf7a06d80960d587d862dc12ca1c4eb6ba3f662..5ca48b5300dd28c2504c85a7b1f78077d6afb99f 100644 --- a/src/plugins/coreplugin/actionmanager/commandsfile.h +++ b/src/plugins/coreplugin/actionmanager/commandsfile.h @@ -40,7 +40,7 @@ namespace Core { namespace Internal { struct ShortcutItem; - + class CommandsFile : public QObject { Q_OBJECT diff --git a/src/plugins/coreplugin/editormanager/editormanager.h b/src/plugins/coreplugin/editormanager/editormanager.h index 23607ed10737b8593fdbbaeaf59f10921b1b86ed..10fee98e854c9c8a646cf926faa2d2e9081a24c6 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.h +++ b/src/plugins/coreplugin/editormanager/editormanager.h @@ -120,7 +120,7 @@ public: const QString &contents = QString()); bool openExternalEditor(const QString &fileName, const QString &editorId); - + QStringList getOpenFileNames() const; QString getOpenWithEditorId(const QString &fileName, bool *isExternalEditor = 0) const; diff --git a/src/plugins/coreplugin/editormanager/editorview.h b/src/plugins/coreplugin/editormanager/editorview.h index 746a126d64534ef54081b9f0f625ec3fa2e985c7..fc963a2bd4804afda90705fc8b712452e457ca3c 100644 --- a/src/plugins/coreplugin/editormanager/editorview.h +++ b/src/plugins/coreplugin/editormanager/editorview.h @@ -169,7 +169,7 @@ public: inline bool isView() const { return m_view != 0; } inline bool isRoot() const { return m_isRoot; } - + inline bool isSplitter() const { return m_splitter != 0; } inline Core::IEditor *editor() const { return m_view ? m_view->currentEditor() : 0; } inline QList<Core::IEditor *> editors() const { return m_view ? m_view->editors() : QList<Core::IEditor*>(); } diff --git a/src/plugins/coreplugin/editormanager/openeditorsview.h b/src/plugins/coreplugin/editormanager/openeditorsview.h index 42a3a7459b66e8278f8e835d6ae77230d61ed002..a6b96c5e8532813764ac44a6b1670d584c15a03a 100644 --- a/src/plugins/coreplugin/editormanager/openeditorsview.h +++ b/src/plugins/coreplugin/editormanager/openeditorsview.h @@ -26,7 +26,7 @@ ** contact the sales department at http://qt.nokia.com/contact. ** **************************************************************************/ - + #ifndef OPENEDITORSVIEW_H #define OPENEDITORSVIEW_H diff --git a/src/plugins/coreplugin/fancytabwidget.cpp b/src/plugins/coreplugin/fancytabwidget.cpp index 3ee85e84a05b59863733e38b22ff6ee4fa10c706..647def0006b2317ae47b3af5b65c6a8c8175ce8f 100644 --- a/src/plugins/coreplugin/fancytabwidget.cpp +++ b/src/plugins/coreplugin/fancytabwidget.cpp @@ -284,7 +284,7 @@ public: void mousePressEvent(QMouseEvent *ev) { - if (ev->modifiers() & Qt::ShiftModifier) + if (ev->modifiers() & Qt::ShiftModifier) Utils::StyleHelper::setBaseColor(QColorDialog::getColor(Utils::StyleHelper::baseColor(), m_parent)); } private: diff --git a/src/plugins/coreplugin/inavigationwidgetfactory.h b/src/plugins/coreplugin/inavigationwidgetfactory.h index d148caafcf6721486a78426bb729214ed7f55942..af7100fe58e39b7da98fc5533fef90fc88f06a29 100644 --- a/src/plugins/coreplugin/inavigationwidgetfactory.h +++ b/src/plugins/coreplugin/inavigationwidgetfactory.h @@ -59,7 +59,7 @@ public: virtual QString id() const = 0; virtual QKeySequence activationSequence() const; // This design is not optimal, think about it again once we need to extend it - // It could be implemented as returning an object which has both the widget + // It could be implemented as returning an object which has both the widget // and the docktoolbar widgets // Similar to how IView virtual NavigationView createWidget() = 0; diff --git a/src/plugins/coreplugin/outputpane.cpp b/src/plugins/coreplugin/outputpane.cpp index 49e8501528f1aff324e5ef7807d64d3561b19204..720b00811c651c53241ef1eed79aaf5ce42c071a 100644 --- a/src/plugins/coreplugin/outputpane.cpp +++ b/src/plugins/coreplugin/outputpane.cpp @@ -165,7 +165,7 @@ static OutputPaneManager *m_instance = 0; void OutputPaneManager::create() { - m_instance = new OutputPaneManager; + m_instance = new OutputPaneManager; } void OutputPaneManager::destroy() diff --git a/src/plugins/coreplugin/progressmanager/progressmanager_win.cpp b/src/plugins/coreplugin/progressmanager/progressmanager_win.cpp index 82d43d44156a8ed09bdc4078296e5526152ce868..db99d1b850b88391ba997db7ba54a523ed282a08 100644 --- a/src/plugins/coreplugin/progressmanager/progressmanager_win.cpp +++ b/src/plugins/coreplugin/progressmanager/progressmanager_win.cpp @@ -40,7 +40,7 @@ #include "progressmanager_p.h" // for windows progress bar -#ifndef __GNUC__ +#ifndef __GNUC__ # include <shobjidl.h> #endif diff --git a/src/plugins/coreplugin/styleanimator.h b/src/plugins/coreplugin/styleanimator.h index 5b81827add697f2066feaa52fef65010fcef9996..29578006b7defa96f674cc767df8bfbf3660bffb 100644 --- a/src/plugins/coreplugin/styleanimator.h +++ b/src/plugins/coreplugin/styleanimator.h @@ -37,13 +37,13 @@ #include <QtGui/QPainter> #include <QtGui/QWidget> -/* +/* * This is a set of helper classes to allow for widget animations in * the style. Its mostly taken from Vista style so it should be fully documented * there. * */ - + class Animation { public : @@ -92,7 +92,7 @@ public: void startAnimation(Animation *); void stopAnimation(const QWidget *); Animation* widgetAnimation(const QWidget *) const; - + private: QBasicTimer animationTimer; QList <Animation*> animations; diff --git a/src/plugins/coreplugin/versiondialog.cpp b/src/plugins/coreplugin/versiondialog.cpp index d951d171bf5a19b8498c0cafda6dcfc787e74462..eb3e9e15956d7c4d435788a7693958170f8babcb 100644 --- a/src/plugins/coreplugin/versiondialog.cpp +++ b/src/plugins/coreplugin/versiondialog.cpp @@ -82,8 +82,8 @@ VersionDialog::VersionDialog(QWidget *parent) "The program is provided AS IS with NO WARRANTY OF ANY KIND, " "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " "PARTICULAR PURPOSE.<br/>") - .arg(version, QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize), - QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(IDE_YEAR), + .arg(version, QLatin1String(QT_VERSION_STR), QString::number(QSysInfo::WordSize), + QLatin1String(__DATE__), QLatin1String(__TIME__), QLatin1String(IDE_YEAR), (QLatin1String(IDE_AUTHOR)), ideRev); QLabel *copyRightLabel = new QLabel(description); diff --git a/src/plugins/cpaster/codepastersettings.cpp b/src/plugins/cpaster/codepastersettings.cpp index 1c42d59668d7bd43bcaaab380ea26f4a02ef54c7..5dbfbd9542d920fe0fbeab01ab09271dea78cf37 100644 --- a/src/plugins/cpaster/codepastersettings.cpp +++ b/src/plugins/cpaster/codepastersettings.cpp @@ -75,7 +75,7 @@ QString CodePasterSettingsPage::displayCategory() const } QWidget *CodePasterSettingsPage::createPage(QWidget *parent) -{ +{ QGroupBox *groupBox = new QGroupBox(); QVBoxLayout *groupBoxLayout = new QVBoxLayout(groupBox); QFormLayout *formLayout = new QFormLayout; diff --git a/src/plugins/cppeditor/cppclasswizard.cpp b/src/plugins/cppeditor/cppclasswizard.cpp index 5f6266e64e61307bd146f8d1cda831560fe15c0d..a0fa2ca2fef531cd2c362507f9410bfe78460f19 100644 --- a/src/plugins/cppeditor/cppclasswizard.cpp +++ b/src/plugins/cppeditor/cppclasswizard.cpp @@ -78,7 +78,7 @@ ClassNamePage::ClassNamePage(QWidget *parent) : connect(m_newClassWidget, SIGNAL(validChanged()), this, SLOT(slotValidChanged())); - QVBoxLayout *pageLayout = new QVBoxLayout(this); + QVBoxLayout *pageLayout = new QVBoxLayout(this); pageLayout->addWidget(m_newClassWidget); QSpacerItem *vSpacer = new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::Expanding); pageLayout->addItem(vSpacer); diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index b56efec4c6b7d7ee4739cbcb171e265c77b6aa42..d1f52f4fb6a1fcf9216f1e3193872fd0672222a9 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -898,7 +898,7 @@ const Macro *CPPEditor::findCanonicalMacro(const QTextCursor &cursor, } void CPPEditor::findUsages() -{ +{ if (Symbol *canonicalSymbol = markSymbols()) { m_modelManager->findUsages(canonicalSymbol); } else if (const Macro *macro = findCanonicalMacro(textCursor(), m_lastSemanticInfo.doc)) { @@ -1766,7 +1766,7 @@ void CPPEditor::keyPressEvent(QKeyEvent *e) // Eat backspace at start of name e->accept(); return; - } + } break; } case Qt::Key_Delete: { @@ -1821,7 +1821,7 @@ QString CPPEditorEditable::id() const bool CPPEditorEditable::open(const QString & fileName) { - bool b = TextEditor::BaseTextEditorEditable::open(fileName); + bool b = TextEditor::BaseTextEditorEditable::open(fileName); editor()->setMimeType(Core::ICore::instance()->mimeDatabase()->findByFile(QFileInfo(fileName)).type()); return b; } diff --git a/src/plugins/cppeditor/cppplugin.cpp b/src/plugins/cppeditor/cppplugin.cpp index ace3b776d868ca5003aba93af8d64c189d564bd9..20fd8230ce565d6af20dadc56b58c71e249514b5 100644 --- a/src/plugins/cppeditor/cppplugin.cpp +++ b/src/plugins/cppeditor/cppplugin.cpp @@ -284,7 +284,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess | TextEditor::TextEditorActionHandler::UnCollapseAll); m_actionHandler->initializeActions(); - + contextMenu->addAction(createSeparator(am, this, context, CppEditor::Constants::SEPARATOR)); cmd = am->command(TextEditor::Constants::AUTO_INDENT_SELECTION); diff --git a/src/plugins/cppeditor/cppquickfix.cpp b/src/plugins/cppeditor/cppquickfix.cpp index c2989afd113dcc1f3efec56c387b815c74c2ede2..397cdfd79306e53222f372c616563e8b615a51cf 100644 --- a/src/plugins/cppeditor/cppquickfix.cpp +++ b/src/plugins/cppeditor/cppquickfix.cpp @@ -756,7 +756,7 @@ public: move(startOf(condition->right_expression), startOf(pattern->rparen_token), insertPos); insert(insertPos, QLatin1String(")")); copy(endOf(pattern->rparen_token), endOf(pattern->statement), insertPos); - + remove(endOf(condition->left_expression), startOf(condition->right_expression)); } @@ -1180,7 +1180,7 @@ bool QuickFixOperation::isCursorOn(const CPlusPlus::AST *ast) const } QuickFixOperation::Range QuickFixOperation::createRange(AST *ast) const -{ +{ QTextCursor tc = _textCursor; Range r(tc); r.begin.setPosition(startOf(ast)); diff --git a/src/plugins/cpptools/cppfilesettingspage.h b/src/plugins/cpptools/cppfilesettingspage.h index 1c167ff35ab877ffd69dfd636ace9e3c812bc111..fd4afd78d73a2126ed9002cb135dcacd372bf5a8 100644 --- a/src/plugins/cpptools/cppfilesettingspage.h +++ b/src/plugins/cpptools/cppfilesettingspage.h @@ -55,7 +55,7 @@ struct CppFileSettings { void toSettings(QSettings *) const; void fromSettings(QSettings *); - bool applySuffixesToMimeDB(); + bool applySuffixesToMimeDB(); // Convenience to return a license template completely formatted. // Currently made public in @@ -79,7 +79,7 @@ public: QString searchKeywords() const; -private slots: +private slots: void slotEdit(); private: diff --git a/src/plugins/cpptools/cppmodelmanagerinterface.h b/src/plugins/cpptools/cppmodelmanagerinterface.h index 18b991e9419911a19a2e37eb4fa0384058cecb18..f9c6d667bcfad74f6779c983fd27794c7a3a6f68 100644 --- a/src/plugins/cpptools/cppmodelmanagerinterface.h +++ b/src/plugins/cpptools/cppmodelmanagerinterface.h @@ -128,7 +128,7 @@ public: public Q_SLOTS: void updateModifiedSourceFiles(); - virtual void updateSourceFiles(const QStringList &sourceFiles) = 0; + virtual void updateSourceFiles(const QStringList &sourceFiles) = 0; virtual void GC() = 0; }; diff --git a/src/plugins/cvs/cvssettings.cpp b/src/plugins/cvs/cvssettings.cpp index f5dea5094932fd80684f0edc8bb9082233136a9d..232fb4f1a3c58b8a2d65e76934083e54836bb4d8 100644 --- a/src/plugins/cvs/cvssettings.cpp +++ b/src/plugins/cvs/cvssettings.cpp @@ -83,7 +83,7 @@ void CVSSettings::toSettings(QSettings *settings) const settings->setValue(QLatin1String(commandKeyC), cvsCommand); settings->setValue(QLatin1String(promptToSubmitKeyC), promptToSubmit); settings->setValue(QLatin1String(rootC), cvsRoot); - settings->setValue(QLatin1String(diffOptionsKeyC), cvsDiffOptions); + settings->setValue(QLatin1String(diffOptionsKeyC), cvsDiffOptions); settings->setValue(QLatin1String(timeOutKeyC), timeOutS); settings->setValue(QLatin1String(describeByCommitIdKeyC), describeByCommitId); settings->endGroup(); diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index f7d6be752a54c44a2eb5168883e89ed208864369..372ea133f4813224a36d203d65d02f1c22bd95fc 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -130,7 +130,7 @@ public: // return; if (m_data->markerLineNumber != lineNumber) { m_data->markerLineNumber = lineNumber; - // FIXME: should we tell gdb about the change? + // FIXME: should we tell gdb about the change? // Ignore it for now, as we would require re-compilation // and debugger re-start anyway. if (0 && !m_data->bpLineNumber.isEmpty()) { @@ -171,10 +171,10 @@ BreakpointData::BreakpointData(BreakHandler *handler) bpMultiple = false; //#if defined(Q_OS_MAC) // // full names do not work on Mac/MI - useFullPath = false; + useFullPath = false; //#else // //where = m_manager->shortName(data->fileName); -// useFullPath = true; +// useFullPath = true; //#endif } @@ -512,7 +512,7 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const // str = data->markerFileName; str = str.isEmpty() ? empty : str; if (data->useFullPath) - str = "/.../" + str; + str = "/.../" + str; return str; } if (role == Qt::UserRole) @@ -595,7 +595,7 @@ bool BreakHandler::setData(const QModelIndex &mi, const QVariant &value, int rol } return true; } - default: { + default: { return false; } } diff --git a/src/plugins/debugger/breakwindow.cpp b/src/plugins/debugger/breakwindow.cpp index 35b6fdba6671ecf2e3031080df303740cdf39f1c..05809ff5937def8203af3b06190aa9692499d8a6 100644 --- a/src/plugins/debugger/breakwindow.cpp +++ b/src/plugins/debugger/breakwindow.cpp @@ -318,7 +318,7 @@ void BreakWindow::resizeColumnsToContents() void BreakWindow::setAlwaysResizeColumnsToContents(bool on) { m_alwaysResizeColumnsToContents = on; - QHeaderView::ResizeMode mode = on + QHeaderView::ResizeMode mode = on ? QHeaderView::ResizeToContents : QHeaderView::Interactive; for (int i = model()->columnCount(); --i >= 0; ) header()->setResizeMode(i, mode); diff --git a/src/plugins/debugger/cdb/cdbbreakpoint.cpp b/src/plugins/debugger/cdb/cdbbreakpoint.cpp index ba90e6a3a95126bf55c2e8284b9dc41242e5fe24..5c81b371512d02d3f544d5d00b6e0cb5d12cecea 100644 --- a/src/plugins/debugger/cdb/cdbbreakpoint.cpp +++ b/src/plugins/debugger/cdb/cdbbreakpoint.cpp @@ -105,7 +105,7 @@ void CDBBreakPoint::clear() ignoreCount = 0; oneShot = false; enabled = true; - clearExpressionData(); + clearExpressionData(); } void CDBBreakPoint::clearExpressionData() @@ -516,7 +516,7 @@ bool CDBBreakPoint::synchronizeBreakPoints(CIDebugControl* debugControl, CIDebugSymbols *syms, BreakHandler *handler, QString *errorMessage, QStringList *warnings) -{ +{ errorMessage->clear(); warnings->clear(); // Do an initial check whether we are in a state that allows diff --git a/src/plugins/debugger/cdb/cdbcore.pri b/src/plugins/debugger/cdb/cdbcore.pri index 1232f516b6e953a98215318ba123174bcc8c93e1..045b0c6382c7819ce11604272ee71c8d444bc164 100644 --- a/src/plugins/debugger/cdb/cdbcore.pri +++ b/src/plugins/debugger/cdb/cdbcore.pri @@ -1,5 +1,5 @@ # Detect presence of "Debugging Tools For Windows" -# in case VS compilers are used. +# in case VS compilers are used. win32 { contains(QMAKE_CXX, cl) { @@ -27,7 +27,7 @@ HEADERS += \ $$PWD/coreengine.h \ $$PWD/debugoutputbase.h \ $$PWD/debugeventcallbackbase.h -SOURCES += \ +SOURCES += \ $$PWD/coreengine.cpp \ $$PWD/debugoutputbase.cpp \ $$PWD/debugeventcallbackbase.cpp diff --git a/src/plugins/debugger/cdb/cdbdebugengine.cpp b/src/plugins/debugger/cdb/cdbdebugengine.cpp index 26f269581e1f76f3d264305fd440e03f1a8a31f0..b5c8c26086d5458b1ef5a7eea9ab0e215a90716e 100644 --- a/src/plugins/debugger/cdb/cdbdebugengine.cpp +++ b/src/plugins/debugger/cdb/cdbdebugengine.cpp @@ -126,7 +126,7 @@ CdbDebugEnginePrivate::CdbDebugEnginePrivate(DebuggerManager *manager, m_eventThreadId(-1), m_interruptArticifialThreadId(-1), m_ignoreInitialBreakPoint(false), - m_interrupted(false), + m_interrupted(false), m_engine(engine), m_currentStackTrace(0), m_firstActivatedFrame(true), @@ -454,7 +454,7 @@ bool CdbDebugEngine::startDebuggerWithExecutable(DebuggerStartMode sm, QString * } void CdbDebugEnginePrivate::processCreatedAttached(ULONG64 processHandle, ULONG64 initialThreadHandle) -{ +{ m_engine->setState(InferiorRunningRequested, Q_FUNC_INFO, __LINE__); setDebuggeeHandles(reinterpret_cast<HANDLE>(processHandle), reinterpret_cast<HANDLE>(initialThreadHandle)); ULONG currentThreadId; @@ -747,7 +747,7 @@ bool CdbDebugEngine::step(unsigned long executionStatus) str << 'p'; break; case DEBUG_STATUS_STEP_INTO: - str << 't'; + str << 't'; break; case CdbExtendedExecutionStatusStepOut: str << "gu"; @@ -784,7 +784,7 @@ void CdbDebugEngine::nextExec() } void CdbDebugEngine::stepIExec() -{ +{ stepExec(); // Step into by instruction (figured out by step) } @@ -801,7 +801,7 @@ void CdbDebugEngine::stepOutExec() void CdbDebugEngine::continueInferior() { - QString errorMessage; + QString errorMessage; if (!m_d->continueInferior(&errorMessage)) warning(msgFunctionFailed(Q_FUNC_INFO, errorMessage)); } @@ -979,7 +979,7 @@ void CdbDebugEngine::activateFrame(int frameIndex) QString errorMessage; bool success = false; StackHandler *stackHandler = manager()->stackHandler(); - do { + do { WatchHandler *watchHandler = manager()->watchHandler(); const int oldIndex = stackHandler->currentIndex(); if (frameIndex >= stackHandler->stackSize()) { @@ -1091,7 +1091,7 @@ void CdbDebugEngine::fetchDisassembler(DisassemblerViewAgent *agent, bool ok = false; QString errorMessage; do { - // get address + // get address QString address; if (!frame.file.isEmpty()) address = frame.address; @@ -1348,7 +1348,7 @@ bool CdbDebugEnginePrivate::setCDBThreadId(unsigned long threadId, QString *erro return false; } const QString msg = CdbDebugEngine::tr("Changing threads: %1 -> %2").arg(currentThreadId).arg(threadId); - m_engine->showStatusMessage(msg, 500); + m_engine->showStatusMessage(msg, 500); return true; } @@ -1423,7 +1423,7 @@ void CdbDebugEnginePrivate::updateStackTrace() break; } // Visibly warn the users about missing top frames/all frames, as they otherwise - // might think stepping is broken. + // might think stepping is broken. if (!stackFrames.at(0).isUsable()) { const QString topFunction = count ? stackFrames.at(0).function : QString(); const QString msg = current >= 0 ? diff --git a/src/plugins/debugger/cdb/cdbdebugengine.h b/src/plugins/debugger/cdb/cdbdebugengine.h index 52fb70119d6d8d53c24bc9800f1ba2bf01dd88c8..0f900560d0c2ede5ebbcf062acae390f36112e70 100644 --- a/src/plugins/debugger/cdb/cdbdebugengine.h +++ b/src/plugins/debugger/cdb/cdbdebugengine.h @@ -73,8 +73,8 @@ public: virtual void nextExec(); virtual void stepIExec(); virtual void nextIExec(); - - virtual void continueInferior(); + + virtual void continueInferior(); virtual void interruptInferior(); virtual void runToLineExec(const QString &fileName, int lineNumber); @@ -107,7 +107,7 @@ public slots: private slots: void slotConsoleStubStarted(); void slotConsoleStubError(const QString &msg); - void slotConsoleStubTerminated(); + void slotConsoleStubTerminated(); void slotBreakAttachToCrashed(); void warning(const QString &w); diff --git a/src/plugins/debugger/cdb/cdbdebugengine_p.h b/src/plugins/debugger/cdb/cdbdebugengine_p.h index 55e7287723074f7241b68567baada8101e94047b..fe6c2a5b61c0ec3c1aaa9ceb73ff9e651d2fa22f 100644 --- a/src/plugins/debugger/cdb/cdbdebugengine_p.h +++ b/src/plugins/debugger/cdb/cdbdebugengine_p.h @@ -109,7 +109,7 @@ public: const QSharedPointer<CdbOptions> m_options; HANDLE m_hDebuggeeProcess; HANDLE m_hDebuggeeThread; - bool m_interrupted; + bool m_interrupted; int m_currentThreadId; int m_eventThreadId; int m_interruptArticifialThreadId; diff --git a/src/plugins/debugger/cdb/cdbdumperhelper.cpp b/src/plugins/debugger/cdb/cdbdumperhelper.cpp index 10f9405e65871f9137a8a797a5c33edf5cc7b042..164b0ad3cc14d983ca1465b22525145f025f5e78 100644 --- a/src/plugins/debugger/cdb/cdbdumperhelper.cpp +++ b/src/plugins/debugger/cdb/cdbdumperhelper.cpp @@ -286,7 +286,7 @@ void CdbDumperInitThread ::run() case CdbDumperHelper::Loaded: // Injection load succeeded, ideally break; } - // Perform remaining initialization + // Perform remaining initialization emit statusMessage(QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "Initializing dumpers..."), 60000); m_ok = m_helper.initResolveSymbols(m_errorMessage) && m_helper.initKnownTypes(m_errorMessage); } @@ -594,7 +594,7 @@ CdbDumperHelper::DumpResult CdbDumperHelper::dumpTypeI(const WatchData &wd, bool { errorMessage->clear(); // Check failure cache and supported types - if (m_state == Disabled) { + if (m_state == Disabled) { *errorMessage =m_msgDisabled; return DumpNotHandled; } diff --git a/src/plugins/debugger/cdb/cdbdumperhelper.h b/src/plugins/debugger/cdb/cdbdumperhelper.h index b4173b5664b9f3175e56fb1815fd1313b9f6f8b9..00fedec121ea6dc1525d21dc9316d13dc4889e05 100644 --- a/src/plugins/debugger/cdb/cdbdumperhelper.h +++ b/src/plugins/debugger/cdb/cdbdumperhelper.h @@ -85,7 +85,7 @@ public: Initialized, // List of types, etc. retrieved }; - explicit CdbDumperHelper(DebuggerManager *manager, + explicit CdbDumperHelper(DebuggerManager *manager, CdbCore::CoreEngine *coreEngine); ~CdbDumperHelper(); diff --git a/src/plugins/debugger/cdb/cdbexceptionutils.cpp b/src/plugins/debugger/cdb/cdbexceptionutils.cpp index a68544f7bc3b0e1e17e467c79730db573c14ff9c..d0d61663cf8974a3245efa5b05720bcc7a69a779 100644 --- a/src/plugins/debugger/cdb/cdbexceptionutils.cpp +++ b/src/plugins/debugger/cdb/cdbexceptionutils.cpp @@ -85,7 +85,7 @@ ExceptionBlocker::ExceptionBlocker(CIDebugControl *ctrl, ULONG code, Mode m) : { // Retrieve current state memset(&m_oldParameters, 0, sizeof(DEBUG_EXCEPTION_FILTER_PARAMETERS)); - if (getExceptionParameters(ctrl, code, &m_oldParameters, &m_errorString)) { + if (getExceptionParameters(ctrl, code, &m_oldParameters, &m_errorString)) { // Are we in a nested instantiation? const ULONG desiredExOption = m == IgnoreException ? DEBUG_FILTER_IGNORE : DEBUG_FILTER_OUTPUT; const bool isAlreadyBlocked = m_oldParameters.ExecutionOption == desiredExOption diff --git a/src/plugins/debugger/cdb/cdbmodules.cpp b/src/plugins/debugger/cdb/cdbmodules.cpp index dbb12f7f0c686a9de442d31b3ff999e93c8ac047..902410d08f5e923c44916bad3313d77ca6c31864 100644 --- a/src/plugins/debugger/cdb/cdbmodules.cpp +++ b/src/plugins/debugger/cdb/cdbmodules.cpp @@ -64,7 +64,7 @@ bool getModuleNameList(CIDebugSymbols *syms, QStringList *modules, QString *erro } bool getModuleList(CIDebugSymbols *syms, QList<Module> *modules, QString *errorMessage) -{ +{ ULONG count; modules->clear(); if (!getModuleCount(syms, &count, errorMessage)) @@ -105,7 +105,7 @@ bool getModuleList(CIDebugSymbols *syms, QList<Module> *modules, QString *errorM bool searchSymbols(CIDebugSymbols *syms, const QString &pattern, QStringList *matches, QString *errorMessage) { - matches->clear(); + matches->clear(); ULONG64 handle = 0; // E_NOINTERFACE means "no match". Apparently, it does not always // set handle. diff --git a/src/plugins/debugger/cdb/cdbstackframecontext.cpp b/src/plugins/debugger/cdb/cdbstackframecontext.cpp index 90d0e3e4e8090db4b7263c70a805ae5c23cc5c02..7aceaae9100e8fa2e50deca1645910b023b953e1 100644 --- a/src/plugins/debugger/cdb/cdbstackframecontext.cpp +++ b/src/plugins/debugger/cdb/cdbstackframecontext.cpp @@ -131,7 +131,7 @@ WatchHandleDumperInserter::WatchHandleDumperInserter(WatchHandler *wh, // Prevent recursion of the model by setting value and type static inline bool fixDumperType(WatchData *wd, const WatchData *source = 0) -{ +{ const bool missing = wd->isTypeNeeded() || wd->type.isEmpty(); if (missing) { static const QString unknownType = QCoreApplication::translate("CdbStackFrameContext", "<Unknown Type>"); diff --git a/src/plugins/debugger/cdb/cdbstackframecontext.h b/src/plugins/debugger/cdb/cdbstackframecontext.h index 61f77a91a4a2d1c62f4d28b4391c2c008bcc7d04..99f1464f02f50c2db2dbf56f5fcc2a5612ce9630 100644 --- a/src/plugins/debugger/cdb/cdbstackframecontext.h +++ b/src/plugins/debugger/cdb/cdbstackframecontext.h @@ -54,7 +54,7 @@ public: explicit CdbStackFrameContext(const QSharedPointer<CdbDumperHelper> &dumper, CdbSymbolGroupContext *symbolContext); - ~CdbStackFrameContext(); + ~CdbStackFrameContext(); bool assignValue(const QString &iname, const QString &value, QString *newValue /* = 0 */, QString *errorMessage); diff --git a/src/plugins/debugger/cdb/cdbstacktracecontext.cpp b/src/plugins/debugger/cdb/cdbstacktracecontext.cpp index bc9143032ae5dfd50cfcf34b6d457ea0f96c0909..b79b7fe8241a866be32c145cb1d7feda13dd4fff 100644 --- a/src/plugins/debugger/cdb/cdbstacktracecontext.cpp +++ b/src/plugins/debugger/cdb/cdbstacktracecontext.cpp @@ -59,7 +59,7 @@ CdbStackTraceContext::CdbStackTraceContext(const QSharedPointer<CdbDumperHelper> CdbStackTraceContext *CdbStackTraceContext::create(const QSharedPointer<CdbDumperHelper> &dumper, unsigned long threadId, QString *errorMessage) -{ +{ if (debugCDB) qDebug() << Q_FUNC_INFO << threadId; // fill the DEBUG_STACK_FRAME array @@ -125,7 +125,7 @@ bool CdbStackTraceContext::init(unsigned long frameCount, QString * /*errorMessa } int CdbStackTraceContext::indexOf(const QString &function) const -{ +{ const QChar exclamationMark = QLatin1Char('!'); const int count = m_frames.size(); @@ -171,7 +171,7 @@ CdbStackFrameContext *CdbStackTraceContext::frameContextAt(int index, QString *e } // Exclude uninitialized variables if desired QStringList uninitializedVariables; - if (theDebuggerAction(UseCodeModel)->isChecked()) { + if (theDebuggerAction(UseCodeModel)->isChecked()) { const StackFrame &frame = m_frames.at(index); getUninitializedVariables(DebuggerManager::instance()->cppCodeModelSnapshot(), frame.function, frame.file, frame.line, &uninitializedVariables); } @@ -268,7 +268,7 @@ static inline bool getStoppedThreadState(const CdbCore::ComInterfaces &cif, } ULONG frameCount; // Ignore the top frame if it is "ntdll!KiFastSystemCallRet", which is - // not interesting for display. + // not interesting for display. DEBUG_STACK_FRAME frames[MaxFrames]; hr = cif.debugControl->GetStackTrace(0, 0, 0, frames, MaxFrames, &frameCount); if (FAILED(hr)) { diff --git a/src/plugins/debugger/cdb/cdbstacktracecontext.h b/src/plugins/debugger/cdb/cdbstacktracecontext.h index 873fa7404a0f535d34a331b1346961c28e3929a4..1e3a65a0da0e8f0c358b34d453ca64e870857a01 100644 --- a/src/plugins/debugger/cdb/cdbstacktracecontext.h +++ b/src/plugins/debugger/cdb/cdbstacktracecontext.h @@ -58,7 +58,7 @@ struct ThreadData; * Maintains an on-demand constructed list of CdbStackFrameContext * containining the local variables of the stack. */ -class CdbStackTraceContext +class CdbStackTraceContext { Q_DISABLE_COPY(CdbStackTraceContext) diff --git a/src/plugins/debugger/cdb/cdbsymbolgroupcontext.cpp b/src/plugins/debugger/cdb/cdbsymbolgroupcontext.cpp index 2547918b38de7668d80ecc089e5f798021454934..e8c25bd90b9830f54008822a66c550d6fc64f66c 100644 --- a/src/plugins/debugger/cdb/cdbsymbolgroupcontext.cpp +++ b/src/plugins/debugger/cdb/cdbsymbolgroupcontext.cpp @@ -413,7 +413,7 @@ static bool inline getUnsignedHexValue(QString stringValue, quint64 *value) return false; stringValue.remove(0, 2); // Remove 64bit separator - if (stringValue.size() > 9) { + if (stringValue.size() > 9) { const int sepPos = stringValue.size() - 9; if (stringValue.at(sepPos) == QLatin1Char('`')) stringValue.remove(sepPos, 1); @@ -489,8 +489,8 @@ WatchData CdbSymbolGroupContext::watchDataAt(unsigned long index) const const QString fullShadowedName = WatchData::shadowedName(name, shadowedNumber); wd.name = WatchData::shadowedName(removeInnerTemplateType(name), shadowedNumber); wd.addr = hexSymbolOffset(m_symbolGroup, index); - const QString type = getSymbolString(m_symbolGroup, &IDebugSymbolGroup2::GetSymbolTypeNameWide, index); - wd.setType(type); + const QString type = getSymbolString(m_symbolGroup, &IDebugSymbolGroup2::GetSymbolTypeNameWide, index); + wd.setType(type); // Check for uninitialized variables at level 0 only. const DEBUG_SYMBOL_PARAMETERS &p = m_symbolParameters.at(index); if (p.ParentSymbol == DEBUG_ANY_ID && m_uninitializedVariables.contains(fullShadowedName)) { diff --git a/src/plugins/debugger/cdb/cdbsymbolgroupcontext.h b/src/plugins/debugger/cdb/cdbsymbolgroupcontext.h index b99cbf154979bdc9c00638b8ef1d3626e0ea823b..d3f63b282bdd0f7d8d2e6d412a96b49546597754 100644 --- a/src/plugins/debugger/cdb/cdbsymbolgroupcontext.h +++ b/src/plugins/debugger/cdb/cdbsymbolgroupcontext.h @@ -74,7 +74,7 @@ class CdbSymbolGroupContext public: ~CdbSymbolGroupContext(); - static CdbSymbolGroupContext *create(const QString &prefix, + static CdbSymbolGroupContext *create(const QString &prefix, CIDebugSymbolGroup *symbolGroup, const QStringList &uninitializedVariables, QString *errorMessage); diff --git a/src/plugins/debugger/debugger.pro b/src/plugins/debugger/debugger.pro index da2dd211758df23e38d387026801b79ae6856f76..ae9f94bdce1bcff13131e0a46663cd615127127c 100644 --- a/src/plugins/debugger/debugger.pro +++ b/src/plugins/debugger/debugger.pro @@ -77,7 +77,7 @@ FORMS += attachexternaldialog.ui \ startexternaldialog.ui \ startremotedialog.ui RESOURCES += debugger.qrc -false { +false { SOURCES += $$PWD/modeltest.cpp HEADERS += $$PWD/modeltest.h DEFINES += USE_MODEL_TEST=1 diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp index 57bbe853bf1cb9cf1bb3d8289ec939d7ab00c673..2f05b16231b0725ec069593ae66a7a1eede42a36 100644 --- a/src/plugins/debugger/debuggeractions.cpp +++ b/src/plugins/debugger/debuggeractions.cpp @@ -60,7 +60,7 @@ DebuggerSettings::~DebuggerSettings() { qDeleteAll(m_items); } - + void DebuggerSettings::insertItem(int code, SavedAction *item) { QTC_ASSERT(!m_items.contains(code), @@ -81,7 +81,7 @@ void DebuggerSettings::writeSettings(QSettings *settings) const foreach (SavedAction *item, m_items) item->writeSettings(settings); } - + SavedAction *DebuggerSettings::item(int code) const { QTC_ASSERT(m_items.value(code, 0), qDebug() << "CODE: " << code; return 0); diff --git a/src/plugins/debugger/debuggeractions.h b/src/plugins/debugger/debuggeractions.h index b8519994b70f079e32d2e08d2456097c7a01a83a..36a3271caf3c6cebac4aea1c79f62e7ee4017084 100644 --- a/src/plugins/debugger/debuggeractions.h +++ b/src/plugins/debugger/debuggeractions.h @@ -60,7 +60,7 @@ public slots: void writeSettings(QSettings *settings) const; private: - QHash<int, Utils::SavedAction *> m_items; + QHash<int, Utils::SavedAction *> m_items; }; @@ -88,7 +88,7 @@ enum DebuggerActionCode DebugDebuggingHelpers, UseCodeModel, - + UseToolTipsInMainEditor, UseToolTipsInLocalsView, UseToolTipsInBreakpointsView, diff --git a/src/plugins/debugger/debuggeragents.cpp b/src/plugins/debugger/debuggeragents.cpp index 317dd150085c01f67aedd94f7ae4f67a30576213..820b48c9498739e8c5b1de1529ef459a4caf24d3 100644 --- a/src/plugins/debugger/debuggeragents.cpp +++ b/src/plugins/debugger/debuggeragents.cpp @@ -76,7 +76,7 @@ MemoryViewAgent::MemoryViewAgent(DebuggerManager *manager, quint64 addr) } MemoryViewAgent::MemoryViewAgent(DebuggerManager *manager, const QString &addr) - : QObject(manager), m_engine(manager->currentEngine()), m_manager(manager) + : QObject(manager), m_engine(manager->currentEngine()), m_manager(manager) { bool ok = true; init(addr.toULongLong(&ok, 0)); @@ -242,7 +242,7 @@ void DisassemblerViewAgent::setFrame(const StackFrame &frame) setContents(*it); return; } - } + } IDebuggerEngine *engine = d->manager->currentEngine(); QTC_ASSERT(engine, return); engine->fetchDisassembler(this, frame); @@ -296,7 +296,7 @@ void DisassemblerViewAgent::setContents(const QString &contents) bool DisassemblerViewAgent::contentsCoversAddress(const QString &contents) const { QTC_ASSERT(d, return false); - for (int pos = 0, line = 0; ; ++line, ++pos) { + for (int pos = 0, line = 0; ; ++line, ++pos) { if (contents.midRef(pos, d->frame.address.size()) == d->frame.address) return true; pos = contents.indexOf('\n', pos + 1); diff --git a/src/plugins/debugger/debuggerconstants.h b/src/plugins/debugger/debuggerconstants.h index a556054e480c5ad65c746a0a82e5ca22b269e1e0..381ea9cf9539f3af6d4ae56c10f7aafcf5b41747 100644 --- a/src/plugins/debugger/debuggerconstants.h +++ b/src/plugins/debugger/debuggerconstants.h @@ -118,7 +118,7 @@ enum LogChannel LogStatus, // Used for status changed messages LogTime, // Used for time stamp messages LogDebug, - LogMisc + LogMisc }; } // namespace Debugger diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp index 3666b848aa2926e9b7adb94bbdeff336fba3001c..b3f1f9e0f03f5b13d88fdafdc2cc2e15b144dacb 100644 --- a/src/plugins/debugger/debuggerdialogs.cpp +++ b/src/plugins/debugger/debuggerdialogs.cpp @@ -391,9 +391,9 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent) m_ui->serverStartScript->setExpectedKind(Utils::PathChooser::File); m_ui->serverStartScript->setPromptDialogTitle(tr("Select Start Script")); - connect(m_ui->useServerStartScriptCheckBox, SIGNAL(toggled(bool)), + connect(m_ui->useServerStartScriptCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateState())); - + connect(m_ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(m_ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject())); diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp index ee3e910e65fcdb0374329b3dec343239e0def845..4b013f53b78891e8b01ed53400595392216887bc 100644 --- a/src/plugins/debugger/debuggermanager.cpp +++ b/src/plugins/debugger/debuggermanager.cpp @@ -659,7 +659,7 @@ void DebuggerManager::setSimpleDockWidgetArrangement() } foreach (QDockWidget *dockWidget, dockWidgets) { - if (dockWidget == d->m_outputDock) + if (dockWidget == d->m_outputDock) d->m_mainWindow->addDockWidget(Qt::TopDockWidgetArea, dockWidget); else d->m_mainWindow->addDockWidget(Qt::BottomDockWidgetArea, dockWidget); @@ -985,7 +985,7 @@ void DebuggerManager::startNewDebugger(const DebuggerStartParametersPtr &sp) d->m_startParameters->toolChainType, &errorMessage); break; default: - d->m_engine = determineDebuggerEngine(d->m_startParameters->executable, + d->m_engine = determineDebuggerEngine(d->m_startParameters->executable, d->m_startParameters->toolChainType, &errorMessage, &settingsIdHint); break; } @@ -1439,7 +1439,7 @@ void DebuggerManager::showDebuggerInput(int channel, const QString &msg) { if (d->m_outputWindow) emit emitShowInput(channel, msg); - else + else qDebug() << "INPUT: " << channel << msg; } diff --git a/src/plugins/debugger/debuggermanager.h b/src/plugins/debugger/debuggermanager.h index bda011154345fad13ac70b2223088eac3aa952c1..7332dec37fde2c7a25613a68292e434b0a5bb7cb 100644 --- a/src/plugins/debugger/debuggermanager.h +++ b/src/plugins/debugger/debuggermanager.h @@ -140,8 +140,8 @@ enum DebuggerEngineTypeFlags ScriptEngineType = 0x02, CdbEngineType = 0x04, AllEngineTypes = GdbEngineType - | ScriptEngineType - | CdbEngineType + | ScriptEngineType + | CdbEngineType }; QDebug operator<<(QDebug d, DebuggerState state); @@ -283,7 +283,7 @@ private: Internal::ThreadsHandler *threadsHandler() const; Internal::WatchHandler *watchHandler() const; Internal::SourceFilesWindow *sourceFileWindow() const; - QWidget *threadsWindow() const; + QWidget *threadsWindow() const; Internal::DebuggerManagerActions debuggerManagerActions() const; diff --git a/src/plugins/debugger/debuggeroutputwindow.h b/src/plugins/debugger/debuggeroutputwindow.h index c67719a4bd93775bf246eeba7685b15aec81594b..696d5454fbbc5d86aa6891ab909d0c599b90722f 100644 --- a/src/plugins/debugger/debuggeroutputwindow.h +++ b/src/plugins/debugger/debuggeroutputwindow.h @@ -53,7 +53,7 @@ public: void bringPaneToForeground() { emit showPage(); } void setCursor(const QCursor &cursor); - + QString combinedContents() const; QString inputContents() const; diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index f65a4c6e5d6aee8abba1fd7189eeefded7512f0d..79bf69ae6ca298fb6b62d753c4b632d423f1444d 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -352,16 +352,16 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent) m_ui.checkBoxUseMessageBoxForSignals); m_group.insert(theDebuggerAction(SkipKnownFrames), m_ui.checkBoxSkipKnownFrames); - m_group.insert(theDebuggerAction(UseToolTipsInMainEditor), + m_group.insert(theDebuggerAction(UseToolTipsInMainEditor), m_ui.checkBoxUseToolTipsInMainEditor); m_group.insert(theDebuggerAction(AutoDerefPointers), 0); m_group.insert(theDebuggerAction(UseToolTipsInLocalsView), 0); m_group.insert(theDebuggerAction(UseToolTipsInBreakpointsView), 0); m_group.insert(theDebuggerAction(UseAddressInBreakpointsView), 0); m_group.insert(theDebuggerAction(UseAddressInStackView), 0); - m_group.insert(theDebuggerAction(EnableReverseDebugging), + m_group.insert(theDebuggerAction(EnableReverseDebugging), m_ui.checkBoxEnableReverseDebugging); - m_group.insert(theDebuggerAction(MaximalStackDepth), + m_group.insert(theDebuggerAction(MaximalStackDepth), m_ui.spinBoxMaximalStackDepth); m_group.insert(theDebuggerAction(GdbWatchdogTimeout), 0); m_group.insert(theDebuggerAction(ShowStdNamespace), 0); @@ -432,7 +432,7 @@ public: virtual bool matches(const QString &s) const; private: - Ui::DebuggingHelperOptionPage m_ui; + Ui::DebuggingHelperOptionPage m_ui; Utils::SavedActionSet m_group; QString m_searchKeywords; }; diff --git a/src/plugins/debugger/debuggertooltip.cpp b/src/plugins/debugger/debuggertooltip.cpp index c26ba6a7271714d4124f3c60d8d6e5c2f600919f..2ec8d86b40fc611a2762683949fb855d74ac991d 100644 --- a/src/plugins/debugger/debuggertooltip.cpp +++ b/src/plugins/debugger/debuggertooltip.cpp @@ -125,7 +125,7 @@ int ToolTipWidget::computeHeight(const QModelIndex &index) const return s; } -Q_SLOT void ToolTipWidget::computeSize() +Q_SLOT void ToolTipWidget::computeSize() { int columns = 0; for (int i = 0; i < 3; ++i) { diff --git a/src/plugins/debugger/gdb/abstractgdbadapter.h b/src/plugins/debugger/gdb/abstractgdbadapter.h index 8685e98a81c1dbec75f43c1890d7155e9e2d7029..c36be546841efe4f92e94d730e2eea836cff0a42 100644 --- a/src/plugins/debugger/gdb/abstractgdbadapter.h +++ b/src/plugins/debugger/gdb/abstractgdbadapter.h @@ -92,7 +92,7 @@ signals: // The adapter is still running just fine, but it failed to acquire a debuggee. void inferiorStartFailed(const QString &msg); - + protected: DebuggerState state() const { return m_engine->state(); } diff --git a/src/plugins/debugger/gdb/classicgdbengine.cpp b/src/plugins/debugger/gdb/classicgdbengine.cpp index 0de85f1525a4357411be78b80a519c5b00c3dfec..f7fbb0672243691a83c50127f96dc600ac2e395f 100644 --- a/src/plugins/debugger/gdb/classicgdbengine.cpp +++ b/src/plugins/debugger/gdb/classicgdbengine.cpp @@ -160,7 +160,7 @@ void GdbEngine::runDebuggingHelperClassic(const WatchData &data0, bool dumpChild data.setValue(_("<unavailable>")); data.setHasChildren(false); insertData(data); - return; + return; } m_processedNames.insert(processedName); @@ -258,7 +258,7 @@ void GdbEngine::updateSubItemClassic(const WatchData &data0) #if DEBUG_SUBITEM qDebug() << "IT'S A POINTER"; #endif - + if (theDebuggerBoolSetting(AutoDerefPointers)) { // Try automatic dereferentiation data.exp = "(*(" + data.exp + "))"; @@ -496,7 +496,7 @@ void GdbEngine::tryLoadDebuggingHelpersClassic() // Load at least gdb macro based dumpers. QFile file(_(":/gdb/gdbmacros.txt")); file.open(QIODevice::ReadOnly); - QByteArray contents = file.readAll(); + QByteArray contents = file.readAll(); m_debuggingHelperState = DebuggingHelperLoadTried; postCommand(contents); return; @@ -574,7 +574,7 @@ void GdbEngine::updateAllClassic() if (supportsThreads()) postCommand("-thread-list-ids", WatchUpdate, CB(handleStackListThreads), 0); manager()->reloadRegisters(); - updateLocals(); + updateLocals(); } void GdbEngine::setDebugDebuggingHelpersClassic(const QVariant &on) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 02d03eab3dac92b225df90c6a7f295e82762c1e6..3213b0830fd54f3775ab2deb1bec392be16f2881 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -196,7 +196,7 @@ void GdbEngine::connectDebuggingHelperActions() connect(theDebuggerAction(RecheckDebuggingHelpers), SIGNAL(triggered()), this, SLOT(recheckDebuggingHelperAvailabilityClassic())); } - + void GdbEngine::disconnectDebuggingHelperActions() { disconnect(theDebuggerAction(UseDebuggingHelpers), 0, this, 0); @@ -395,8 +395,8 @@ void GdbEngine::handleResponse(const QByteArray &buff) while (from != to) { GdbMi data; if (*from != ',') { - // happens on archer where we get - // 23^running <NL> *running,thread-id="all" <NL> (gdb) + // happens on archer where we get + // 23^running <NL> *running,thread-id="all" <NL> (gdb) result.m_type = GdbMi::Tuple; break; } @@ -431,22 +431,22 @@ void GdbEngine::handleResponse(const QByteArray &buff) showStatusMessage(tr("Library %1 unloaded.").arg(_(id))); invalidateSourcesList(); } else if (asyncClass == "thread-group-created") { - // Archer has "{id="28902"}" + // Archer has "{id="28902"}" QByteArray id = result.findChild("id").data(); showStatusMessage(tr("Thread group %1 created.").arg(_(id))); int pid = id.toInt(); if (pid != inferiorPid()) handleInferiorPidChanged(pid); } else if (asyncClass == "thread-created") { - //"{id="1",group-id="28902"}" + //"{id="1",group-id="28902"}" QByteArray id = result.findChild("id").data(); showStatusMessage(tr("Thread %1 created.").arg(_(id))); } else if (asyncClass == "thread-group-exited") { - // Archer has "{id="28902"}" + // Archer has "{id="28902"}" QByteArray id = result.findChild("id").data(); showStatusMessage(tr("Thread group %1 exited.").arg(_(id))); } else if (asyncClass == "thread-exited") { - //"{id="1",group-id="28902"}" + //"{id="1",group-id="28902"}" QByteArray id = result.findChild("id").data(); QByteArray groupid = result.findChild("group-id").data(); showStatusMessage(tr("Thread %1 in group %2 exited.") @@ -454,7 +454,7 @@ void GdbEngine::handleResponse(const QByteArray &buff) } else if (asyncClass == "thread-selected") { QByteArray id = result.findChild("id").data(); showStatusMessage(tr("Thread %1 selected.").arg(_(id))); - //"{id="2"}" + //"{id="2"}" #if defined(Q_OS_MAC) } else if (asyncClass == "shlibs-updated") { // MAC announces updated libs @@ -598,7 +598,7 @@ void GdbEngine::readGdbStandardError() void GdbEngine::readGdbStandardOutput() { - if (m_commandTimer->isActive()) + if (m_commandTimer->isActive()) m_commandTimer->start(); // Retrigger int newstart = 0; @@ -665,7 +665,7 @@ void GdbEngine::maybeHandleInferiorPidChanged(const QString &pid0) } if (pid == inferiorPid()) return; - debugMessage(_("FOUND PID %1").arg(pid)); + debugMessage(_("FOUND PID %1").arg(pid)); handleInferiorPidChanged(pid); } @@ -828,7 +828,7 @@ void GdbEngine::commandTimeout() "the operation.\nYou can choose between waiting " "longer or abort debugging.").arg(timeOut / 1000); QMessageBox *mb = showMessageBox(QMessageBox::Critical, - tr("Gdb not responding"), msg, + tr("Gdb not responding"), msg, QMessageBox::Ok | QMessageBox::Cancel); mb->button(QMessageBox::Cancel)->setText(tr("Give gdb more time")); mb->button(QMessageBox::Ok)->setText(tr("Stop debugging")); @@ -873,7 +873,7 @@ void GdbEngine::handleResultRecord(GdbResponse *response) tr("Executable failed"), QString::fromLocal8Bit(msg)); showStatusMessage(tr("Process failed to start.")); shutdown(); - } else if (msg == "\"finish\" not meaningful in the outermost frame.") { + } else if (msg == "\"finish\" not meaningful in the outermost frame.") { // Handle a case known to appear on gdb 6.4 symbianelf when // the stack is cut due to access to protected memory. debugMessage(_("APPLYING WORKAROUND #2")); @@ -1678,7 +1678,7 @@ AbstractGdbAdapter *GdbEngine::createAdapter(const DebuggerStartParametersPtr &s void GdbEngine::startDebugger(const DebuggerStartParametersPtr &sp) { QTC_ASSERT(state() == EngineStarting, qDebug() << state()); - // This should be set by the constructor or in exitDebugger() + // This should be set by the constructor or in exitDebugger() // via initializeVariables() //QTC_ASSERT(m_debuggingHelperState == DebuggingHelperUninitialized, // initializeVariables()); @@ -1967,7 +1967,7 @@ void GdbEngine::sendInsertBreakpoint(int index) void GdbEngine::reloadBreakListInternal() { - m_breakListUpdating = true; + m_breakListUpdating = true; // "Discardable" as long as we do in each step postCommand("-break-list", NeedsStop | Discardable, CB(handleBreakList)); } @@ -2457,7 +2457,7 @@ void GdbEngine::handleStackSelectThread(const GdbResponse &) showStatusMessage(tr("Retrieving data for stack view..."), 3000); manager()->reloadRegisters(); reloadStack(true); - updateLocals(); + updateLocals(); } void GdbEngine::reloadFullStack() @@ -2555,7 +2555,7 @@ void GdbEngine::handleStackListFrames(const GdbResponse &response) targetFrame = i; } - bool canExpand = !cookie.isFull + bool canExpand = !cookie.isFull && (n >= theDebuggerAction(MaximalStackDepth)->value().toInt()); theDebuggerAction(ExpandStack)->setEnabled(canExpand); manager()->stackHandler()->setFrames(stackFrames, canExpand); @@ -2581,7 +2581,7 @@ void GdbEngine::handleStackListFrames(const GdbResponse &response) // For targetFrame == 0 we already issued a 'gotoLocation' // when reading the *stopped message. bool jump = (m_isMacGdb || targetFrame != 0); - + manager()->stackHandler()->setCurrentIndex(targetFrame); if (jump || cookie.gotoLocation) { const StackFrame &frame = manager()->stackHandler()->currentFrame(); @@ -2978,7 +2978,7 @@ void GdbEngine::updateWatchData(const WatchData &data) data1.setValue(_("<unavailable>")); data1.setHasChildren(false); insertData(data1); - return; + return; } m_processedNames.insert(processedName); @@ -3207,7 +3207,7 @@ void GdbEngine::updateLocals(const QVariant &cookie) m_pendingRequests = 0; if (hasPython()) updateLocalsPython(QByteArray()); - else + else updateLocalsClassic(cookie); } @@ -3246,10 +3246,10 @@ WatchData GdbEngine::localVariable(const GdbMi &item, data.setError(WatchData::msgNotInScope()); return data; } - //: Type of local variable or parameter shadowed by another + //: Type of local variable or parameter shadowed by another //: variable of the same name in a nested block. setWatchDataValue(data, item.findChild("value")); - data.setType(GdbEngine::tr("<shadowed>")); + data.setType(GdbEngine::tr("<shadowed>")); data.setHasChildren(false); return data; } @@ -3431,7 +3431,7 @@ void GdbEngine::fetchDisassemblerByAddress(DisassemblerViewAgent *agent, QByteArray end = QByteArray::number(address + 100, 16); // -data-disassemble [ -s start-addr -e end-addr ] // | [ -f filename -l linenum [ -n lines ] ] -- mode - if (useMixedMode) + if (useMixedMode) postCommand("-data-disassemble -s 0x" + start + " -e 0x" + end + " -- 1", Discardable, CB(handleFetchDisassemblerByAddress1), QVariant::fromValue(DisassemblerAgentCookie(agent))); @@ -3491,7 +3491,7 @@ QString GdbEngine::parseDisassembler(const GdbMi &lines) if (line >= 0 && line < fileContents.size()) ba += " " + fileContents.at(line) + '\n'; GdbMi insn = child.findChild("line_asm_insn"); - foreach (const GdbMi &line, insn.children()) + foreach (const GdbMi &line, insn.children()) ba += parseLine(line); } else { // the non-mixed version diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index d9f44a32643fdfe1b27a9b332455a46aeb326546..6fd2c5e2cf10478f668f0442f717a7cc14656671 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -454,7 +454,7 @@ private: ////////// View & Data Stuff ////////// void updateLocalsClassic(const QVariant &cookie); void updateLocalsPython(const QByteArray &varList); void handleStackFramePython(const GdbResponse &response); - + void handleStackListLocalsClassic(const GdbResponse &response); void handleStackListLocalsPython(const GdbResponse &response); diff --git a/src/plugins/debugger/gdb/gdbmi.cpp b/src/plugins/debugger/gdb/gdbmi.cpp index 639e698d36f39cf0f50cabc7a21156d15309cb0d..b5a5774a83d121aa323cd7a37c583fa4231ee779 100644 --- a/src/plugins/debugger/gdb/gdbmi.cpp +++ b/src/plugins/debugger/gdb/gdbmi.cpp @@ -306,7 +306,7 @@ QByteArray GdbMi::toString(bool multiline, int indent) const else result += "Invalid"; break; - case Const: + case Const: if (!m_name.isEmpty()) result += m_name + "="; result += "\"" + escapeCString(m_data) + "\""; diff --git a/src/plugins/debugger/gdb/gdbmi.h b/src/plugins/debugger/gdb/gdbmi.h index a4ce8375030dea05b26d1e0d72dc37956f8d0f8c..4cc3773ed617ca39787cd69fbb855a133b967a1f 100644 --- a/src/plugins/debugger/gdb/gdbmi.h +++ b/src/plugins/debugger/gdb/gdbmi.h @@ -39,50 +39,50 @@ namespace Internal { /* -output ==> - ( out-of-band-record )* [ result-record ] "(gdb)" nl -result-record ==> - [ token ] "^" result-class ( "," result )* nl -out-of-band-record ==> - async-record | stream-record -async-record ==> - exec-async-output | status-async-output | notify-async-output -exec-async-output ==> - [ token ] "*" async-output -status-async-output ==> - [ token ] "+" async-output -notify-async-output ==> - [ token ] "=" async-output -async-output ==> - async-class ( "," result )* nl -result-class ==> - "done" | "running" | "connected" | "error" | "exit" -async-class ==> - "stopped" | others (where others will be added depending on the needs--this is still in development). -result ==> - variable "=" value -variable ==> - string -value ==> - const | tuple | list -const ==> - c-string -tuple ==> - "{}" | "{" result ( "," result )* "}" -list ==> - "[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]" -stream-record ==> - console-stream-output | target-stream-output | log-stream-output -console-stream-output ==> - "~" c-string -target-stream-output ==> - "@" c-string -log-stream-output ==> - "&" c-string -nl ==> - CR | CR-LF -token ==> - any sequence of digits. +output ==> + ( out-of-band-record )* [ result-record ] "(gdb)" nl +result-record ==> + [ token ] "^" result-class ( "," result )* nl +out-of-band-record ==> + async-record | stream-record +async-record ==> + exec-async-output | status-async-output | notify-async-output +exec-async-output ==> + [ token ] "*" async-output +status-async-output ==> + [ token ] "+" async-output +notify-async-output ==> + [ token ] "=" async-output +async-output ==> + async-class ( "," result )* nl +result-class ==> + "done" | "running" | "connected" | "error" | "exit" +async-class ==> + "stopped" | others (where others will be added depending on the needs--this is still in development). +result ==> + variable "=" value +variable ==> + string +value ==> + const | tuple | list +const ==> + c-string +tuple ==> + "{}" | "{" result ( "," result )* "}" +list ==> + "[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]" +stream-record ==> + console-stream-output | target-stream-output | log-stream-output +console-stream-output ==> + "~" c-string +target-stream-output ==> + "@" c-string +log-stream-output ==> + "&" c-string +nl ==> + CR | CR-LF +token ==> + any sequence of digits. */ @@ -119,7 +119,7 @@ public: inline const QList<GdbMi> &children() const { return m_children; } inline int childCount() const { return m_children.size(); } - const GdbMi &childAt(int index) const { return m_children[index]; } + const GdbMi &childAt(int index) const { return m_children[index]; } GdbMi &childAt(int index) { return m_children[index]; } GdbMi findChild(const char *name) const; @@ -146,7 +146,7 @@ private: enum GdbResultClass { - // "done" | "running" | "connected" | "error" | "exit" + // "done" | "running" | "connected" | "error" | "exit" GdbResultUnknown, GdbResultDone, GdbResultRunning, diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp index ebca806a12a7d9b0b1699e2e769b055ed0ae3aed..4773fbac112ecebda73b5e9903049cf7f9e3bbce 100644 --- a/src/plugins/debugger/gdb/gdboptionspage.cpp +++ b/src/plugins/debugger/gdb/gdboptionspage.cpp @@ -78,9 +78,9 @@ QWidget *GdbOptionsPage::createPage(QWidget *parent) m_ui.scriptFileChooser); m_group.insert(theDebuggerAction(GdbEnvironment), m_ui.environmentEdit); - m_group.insert(theDebuggerAction(UsePreciseBreakpoints), + m_group.insert(theDebuggerAction(UsePreciseBreakpoints), m_ui.checkBoxUsePreciseBreakpoints); - m_group.insert(theDebuggerAction(GdbWatchdogTimeout), + m_group.insert(theDebuggerAction(GdbWatchdogTimeout), m_ui.spinBoxGdbWatchdogTimeout); diff --git a/src/plugins/debugger/gdb/gdboptionspage.h b/src/plugins/debugger/gdb/gdboptionspage.h index a710acb0edfde4f606077d2bf92f89a50e985a55..87fa702c7f49ee221bf0be223a1424e9e67361d5 100644 --- a/src/plugins/debugger/gdb/gdboptionspage.h +++ b/src/plugins/debugger/gdb/gdboptionspage.h @@ -56,7 +56,7 @@ public: static QString settingsId(); -private: +private: Ui::GdbOptionsPage m_ui; Utils::SavedActionSet m_group; QString m_searchKeywords; diff --git a/src/plugins/debugger/gdb/pythongdbengine.cpp b/src/plugins/debugger/gdb/pythongdbengine.cpp index 764936db74d83ebd5544dc982d30c3a896c34e11..d68e8a1eefb8d2a24c3bf3bcb64458326a0d840b 100644 --- a/src/plugins/debugger/gdb/pythongdbengine.cpp +++ b/src/plugins/debugger/gdb/pythongdbengine.cpp @@ -127,7 +127,7 @@ void GdbEngine::handleStackFramePython(const GdbResponse &response) GdbMi all; all.fromStringMultiple(out); //qDebug() << "ALL: " << all.toString(); - + GdbMi data = all.findChild("data"); QList<WatchData> list; foreach (const GdbMi &child, data.children()) { @@ -166,7 +166,7 @@ void GdbEngine::updateAllPython() if (supportsThreads()) postCommand("-thread-list-ids", WatchUpdate, CB(handleStackListThreads), 0); manager()->reloadRegisters(); - updateLocals(); + updateLocals(); } } // namespace Internal diff --git a/src/plugins/debugger/gdb/s60debuggerbluetoothstarter.h b/src/plugins/debugger/gdb/s60debuggerbluetoothstarter.h index 234afa2c2c9c731917befdb53737bcc512678d1e..1fbf16a9c826908cded92bf9e770fe271fdbba70 100644 --- a/src/plugins/debugger/gdb/s60debuggerbluetoothstarter.h +++ b/src/plugins/debugger/gdb/s60debuggerbluetoothstarter.h @@ -43,7 +43,7 @@ namespace Internal { * Provides a static convenience to prompt for both connection types. */ class S60DebuggerBluetoothStarter : public trk::AbstractBluetoothStarter -{ +{ public: static trk::PromptStartCommunicationResult startCommunication(const TrkDevicePtr &trkDevice, @@ -52,7 +52,7 @@ public: QWidget *msgBoxParent, QString *errorMessage); -protected: +protected: virtual trk::BluetoothListener *createListener(); private: diff --git a/src/plugins/debugger/gdb/trkgdbadapter.cpp b/src/plugins/debugger/gdb/trkgdbadapter.cpp index b3e0a79ff7e30728feffb60213be821b76a83dfc..16ff672c59d6cca8398a09e1764a061421f3014a 100644 --- a/src/plugins/debugger/gdb/trkgdbadapter.cpp +++ b/src/plugins/debugger/gdb/trkgdbadapter.cpp @@ -172,7 +172,7 @@ void Snapshot::insertMemory(const MemoryRange &range, const QByteArray &ba) { QTC_ASSERT(range.size() == uint(ba.size()), qDebug() << "RANGE: " << range << " BA SIZE: " << ba.size(); return); - + MEMORY_DEBUG("INSERT: " << range); // Try to combine with existing chunk. Snapshot::Memory::iterator it = memory.begin(); @@ -700,7 +700,7 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd) // Kill inferior process logMessage(msgGdbPacket(QLatin1String("kill"))); sendTrkMessage(0x41, TrkCB(handleDeleteProcess), - trkDeleteProcessMessage(), "Delete process"); + trkDeleteProcessMessage(), "Delete process"); } else if (cmd.startsWith("m")) { @@ -1015,7 +1015,7 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd) if (data.startsWith("auxv:read::")) { const int offsetPos = data.lastIndexOf(':') + 1; const int commaPos = data.lastIndexOf(','); - if (commaPos != -1) { + if (commaPos != -1) { bool ok1 = false, ok2 = false; const int offset = data.mid(offsetPos, commaPos - offsetPos) .toUInt(&ok1, 16); @@ -1282,7 +1282,7 @@ void TrkGdbAdapter::handleReadRegisters(const TrkResult &result) for (int i = 0; i < RegisterCount; ++i) m_snapshot.registers[i] = extractInt(data + 4 * i); m_snapshot.registerValid = true; -} +} void TrkGdbAdapter::handleWriteRegister(const TrkResult &result) { @@ -1293,7 +1293,7 @@ void TrkGdbAdapter::handleWriteRegister(const TrkResult &result) return; } sendGdbServerMessage("OK"); -} +} void TrkGdbAdapter::reportRegisters() { @@ -1446,7 +1446,7 @@ void TrkGdbAdapter::tryAnswerGdbMemoryRequest(bool buffered) Snapshot::Memory::const_iterator et = m_snapshot.memory.end(); for ( ; it != et; ++it) { MEMORY_DEBUG(" NEEDED STEP: " << needed); - needed -= it.key(); + needed -= it.key(); } MEMORY_DEBUG("NEEDED FINAL: " << needed); @@ -1621,7 +1621,7 @@ void TrkGdbAdapter::handleClearBreakpoint(const TrkResult &result) if (result.errorCode()) { logMessage("ERROR: " + result.errorString()); //return; - } + } sendGdbServerMessage("OK"); } @@ -1716,7 +1716,7 @@ void TrkGdbAdapter::startAdapter() logMessage(QLatin1String("### Starting TrkGdbAdapter")); m_trkDevice->setSerialFrame(effectiveTrkDeviceType() != TrkOptions::BlueTooth); // Prompt the user to start communication - QString message; + QString message; const trk::PromptStartCommunicationResult src = S60DebuggerBluetoothStarter::startCommunication(m_trkDevice, effectiveTrkDevice(), @@ -1807,8 +1807,8 @@ void TrkGdbAdapter::handleCreateProcess(const TrkResult &result) m_engine->postCommand("set breakpoint always-inserted on"); m_engine->postCommand("set trust-readonly-sections"); // No difference? m_engine->postCommand("set displaced-stepping on"); // No difference? - m_engine->postCommand("mem 0x00400000 0x00800000 cache"); - m_engine->postCommand("mem 0x78000000 0x88000000 cache ro"); + m_engine->postCommand("mem 0x00400000 0x00800000 cache"); + m_engine->postCommand("mem 0x78000000 0x88000000 cache ro"); // FIXME: replace with stack-cache for newer gdb? m_engine->postCommand("set remotecache on"); // "info dcache" to check m_engine->postCommand("target remote " + gdbServerName().toLatin1(), @@ -1900,16 +1900,16 @@ void TrkGdbAdapter::handleDirectWrite1(const TrkResult &response) appendByte(&ba, 0xe5); #else // Thumb: - // subs r0, #16 + // subs r0, #16 appendByte(&ba, 0x08); appendByte(&ba, 0x3b); - // subs r0, #16 + // subs r0, #16 appendByte(&ba, 0x08); appendByte(&ba, 0x3b); // appendByte(&ba, 0x08); appendByte(&ba, 0x3b); - // subs r0, #16 + // subs r0, #16 appendByte(&ba, 0x08); appendByte(&ba, 0x3b); #endif diff --git a/src/plugins/debugger/gdb/trkgdbadapter.h b/src/plugins/debugger/gdb/trkgdbadapter.h index 2aeb696c720793ff63fd75ecec2c42e6fa351bc8..84756dc388fb81a42f7889b5c2913da559c00d29 100644 --- a/src/plugins/debugger/gdb/trkgdbadapter.h +++ b/src/plugins/debugger/gdb/trkgdbadapter.h @@ -250,7 +250,7 @@ private: QByteArray trkWriteMemoryMessage(uint addr, const QByteArray &date); QByteArray trkBreakpointMessage(uint addr, uint len, bool armMode = true); QByteArray trkStepRangeMessage(byte option); - QByteArray trkDeleteProcessMessage(); + QByteArray trkDeleteProcessMessage(); QByteArray trkInterruptMessage(); QSharedPointer<trk::TrkDevice> m_trkDevice; diff --git a/src/plugins/debugger/idebuggerengine.h b/src/plugins/debugger/idebuggerengine.h index b47a6d15478fa6e11c63b2b82c8300bc2bd36a5a..2c72aa845b4109454ea8c8b673a43fd73ee4ab0e 100644 --- a/src/plugins/debugger/idebuggerengine.h +++ b/src/plugins/debugger/idebuggerengine.h @@ -83,7 +83,7 @@ public: virtual void nextExec() = 0; virtual void stepIExec() = 0; virtual void nextIExec() = 0; - + virtual void continueInferior() = 0; virtual void interruptInferior() = 0; diff --git a/src/plugins/debugger/moduleshandler.cpp b/src/plugins/debugger/moduleshandler.cpp index e57ed94193791b8f06ad480defeaf2c5fe739493..0a754750327bb4bc24fdcf54e1e0a36b464e8edb 100644 --- a/src/plugins/debugger/moduleshandler.cpp +++ b/src/plugins/debugger/moduleshandler.cpp @@ -84,7 +84,7 @@ QVariant ModulesModel::headerData(int section, { if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { static QString headers[] = { - tr("Module name") + " ", + tr("Module name") + " ", tr("Symbols read") + " ", tr("Start address") + " ", tr("End address") + " " @@ -115,7 +115,7 @@ QVariant ModulesModel::data(const QModelIndex &index, int role) const break; case 1: if (role == Qt::DisplayRole) - return module.symbolsRead ? "yes" : "no"; + return module.symbolsRead ? "yes" : "no"; break; case 2: if (role == Qt::DisplayRole) diff --git a/src/plugins/debugger/moduleswindow.cpp b/src/plugins/debugger/moduleswindow.cpp index 6d46dda03c50eae2437782acd868dab2f39402a7..95229f10bb5501c9eb8d7cac67e8412227f60326 100644 --- a/src/plugins/debugger/moduleswindow.cpp +++ b/src/plugins/debugger/moduleswindow.cpp @@ -175,7 +175,7 @@ void ModulesWindow::resizeColumnsToContents() void ModulesWindow::setAlwaysResizeColumnsToContents(bool on) { m_alwaysResizeColumnsToContents = on; - QHeaderView::ResizeMode mode = on + QHeaderView::ResizeMode mode = on ? QHeaderView::ResizeToContents : QHeaderView::Interactive; header()->setResizeMode(0, mode); header()->setResizeMode(1, mode); @@ -189,7 +189,7 @@ void ModulesWindow::setModel(QAbstractItemModel *model) QTreeView::setModel(model); setAlwaysResizeColumnsToContents(true); } - + void ModulesWindow::showSymbols(const QString &name) { if (name.isEmpty()) diff --git a/src/plugins/debugger/name_demangler.cpp b/src/plugins/debugger/name_demangler.cpp index 8c6fc5e5f16d705fbfe10093d9bfb1906ae8c8dd..4e3cf92cdb3802c9f86fb48f4ad0364d42404182 100644 --- a/src/plugins/debugger/name_demangler.cpp +++ b/src/plugins/debugger/name_demangler.cpp @@ -51,7 +51,7 @@ #endif // DO_TRACE namespace Debugger { -namespace Internal { +namespace Internal { class NameDemanglerPrivate { @@ -138,7 +138,7 @@ private: QLatin1String("")) { } - + const QString makeExpr(const QStringList &exprs) const { Q_ASSERT(exprs.size() == 2); @@ -166,7 +166,7 @@ private: QLatin1String("")) { } - + const QString makeExpr(const QStringList &exprs) const { Q_ASSERT(exprs.size() == 2); @@ -182,7 +182,7 @@ private: QLatin1String("")) { } - + virtual const QString makeExpr(const QStringList &exprs) const { Q_ASSERT(exprs.size() == 3); diff --git a/src/plugins/debugger/name_demangler.h b/src/plugins/debugger/name_demangler.h index 2a13f1e2a84a7a2e8322d279bf3087bd9613932c..461324efe97b983639f617a0dd24c8278e7df30d 100644 --- a/src/plugins/debugger/name_demangler.h +++ b/src/plugins/debugger/name_demangler.h @@ -54,7 +54,7 @@ public: bool demangle(const QString &mangledName); /* - * A textual description of the error encountered, if there was one. + * A textual description of the error encountered, if there was one. * Only valid if demangle() returned false. */ const QString &errorString() const; diff --git a/src/plugins/debugger/registerhandler.cpp b/src/plugins/debugger/registerhandler.cpp index cbff586239b887b775cdbb84914e19062a9994ea..9b6cb4e015b59fbfd70c62905a42a0714a92b1ff 100644 --- a/src/plugins/debugger/registerhandler.cpp +++ b/src/plugins/debugger/registerhandler.cpp @@ -100,7 +100,7 @@ QVariant RegisterHandler::data(const QModelIndex &index, int role) const if (role == RegisterChangedRole) return reg.changed; - + return QVariant(); } diff --git a/src/plugins/debugger/registerhandler.h b/src/plugins/debugger/registerhandler.h index de3b8a3df8a56269ea48df79069e2d4540d2f4a8..cc4e27160019b8a58acc2107bc1b51bc2684085d 100644 --- a/src/plugins/debugger/registerhandler.h +++ b/src/plugins/debugger/registerhandler.h @@ -39,7 +39,7 @@ enum RegisterRole { RegisterNumberBaseRole = Qt::UserRole, // Currently used number base RegisterAddressRole, // Start value for opening memory view - RegisterChangedRole // Used for painting changed values + RegisterChangedRole // Used for painting changed values }; class Register @@ -76,7 +76,7 @@ private: QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; Qt::ItemFlags flags(const QModelIndex &idx) const; - + QList<Register> m_registers; int m_base; int m_strlen; // approximate width of an value in chars diff --git a/src/plugins/debugger/registerwindow.cpp b/src/plugins/debugger/registerwindow.cpp index ddaedbd808c381b62946eeb3e28bd24b2b29d582..092efb445e2e7191543e1cafef84d855206bb28c 100644 --- a/src/plugins/debugger/registerwindow.cpp +++ b/src/plugins/debugger/registerwindow.cpp @@ -205,7 +205,7 @@ void RegisterWindow::contextMenuEvent(QContextMenuEvent *ev) menu.addAction(theDebuggerAction(SettingsDialog)); QAction *act = menu.exec(ev->globalPos()); - + if (act == actAdjust) resizeColumnsToContents(); else if (act == actAlwaysAdjust) diff --git a/src/plugins/debugger/script/script.pri b/src/plugins/debugger/script/script.pri index 99a1d1470344e5e8e0f432826785e747e2273c6a..48d9460aa5e5a4b1392530ad705012a2b071a4c2 100644 --- a/src/plugins/debugger/script/script.pri +++ b/src/plugins/debugger/script/script.pri @@ -4,6 +4,6 @@ HEADERS += \ SOURCES += \ $$PWD/scriptengine.cpp \ -FORMS += +FORMS += -RESOURCES += +RESOURCES += diff --git a/src/plugins/debugger/script/scriptengine.cpp b/src/plugins/debugger/script/scriptengine.cpp index f5197a64397d212809f7d4366fa867c82ae6a27f..5b5f5043f7a7db08f7b4da5992160f482171f849 100644 --- a/src/plugins/debugger/script/scriptengine.cpp +++ b/src/plugins/debugger/script/scriptengine.cpp @@ -104,7 +104,7 @@ public: private: void maybeBreakNow(bool byFunction); - ScriptEngine *q; + ScriptEngine *q; }; ScriptAgent::ScriptAgent(ScriptEngine *debugger, QScriptEngine *script) @@ -208,7 +208,7 @@ void ScriptEngine::executeDebuggerCommand(const QString &command) void ScriptEngine::shutdown() { - exitDebugger(); + exitDebugger(); } void ScriptEngine::exitDebugger() @@ -618,7 +618,7 @@ bool ScriptEngine::checkForBreakCondition(bool byFunction) showStatusMessage(tr("Stopped at %1:%2.").arg(fileName).arg(lineNumber), 5000); StackFrame frame; - frame.file = fileName; + frame.file = fileName; frame.line = lineNumber; manager()->gotoLocation(frame, true); updateLocals(); @@ -633,7 +633,7 @@ void ScriptEngine::updateLocals() // // Build stack - // + // QList<StackFrame> stackFrames; int i = 0; for (QScriptContext *c = context; c; c = c->parentContext(), ++i) { diff --git a/src/plugins/debugger/shared/backtrace.cpp b/src/plugins/debugger/shared/backtrace.cpp index 6b81e9339e52df06fa38c85b9c11e627a4c89b9d..c535b023f9b430f0d13a2d2d223d7ae04422e688 100644 --- a/src/plugins/debugger/shared/backtrace.cpp +++ b/src/plugins/debugger/shared/backtrace.cpp @@ -35,7 +35,7 @@ #include <stdio.h> #include <signal.h> #include <execinfo.h> -#endif +#endif namespace Debugger { namespace Internal { diff --git a/src/plugins/debugger/shared/backtrace.h b/src/plugins/debugger/shared/backtrace.h index 771ec2a3d17f56e0441948c17e332e4d75f142d3..88d80bb08ef9f66fd14a6b962e5f0d905dc3859f 100644 --- a/src/plugins/debugger/shared/backtrace.h +++ b/src/plugins/debugger/shared/backtrace.h @@ -37,7 +37,7 @@ namespace Internal { void dumpBacktrace(int maxdepth = -1); -} // namespace Internal +} // namespace Internal } // namespace Debugger #endif // DEBUGGER_BACKTRACE_H diff --git a/src/plugins/debugger/shared/dbgwinutils.cpp b/src/plugins/debugger/shared/dbgwinutils.cpp index 842c9631b2a38652352d992688c25997a56cc4f3..09ab75fd8334066c33b8a48c29b2d294ea8b3be9 100644 --- a/src/plugins/debugger/shared/dbgwinutils.cpp +++ b/src/plugins/debugger/shared/dbgwinutils.cpp @@ -37,7 +37,7 @@ namespace Debugger { namespace Internal { - + #ifdef USE_PSAPI static inline QString imageName(DWORD processId) { diff --git a/src/plugins/debugger/shared/peutils.cpp b/src/plugins/debugger/shared/peutils.cpp index 0fb5350fbb610d3b4c83c6a674f5b7566c0c757f..6c9fd3e717bba708e9efde87f2e195b8bc1a783d 100644 --- a/src/plugins/debugger/shared/peutils.cpp +++ b/src/plugins/debugger/shared/peutils.cpp @@ -160,7 +160,7 @@ static bool getDebugDirectory(IMAGE_NT_HEADERS *ntHeaders, #endif // Empty. This is the case for MinGW binaries if (debugDirSize == 0) - return true; + return true; // Look up in file DWORD debugDirOffset; if (!getFileOffsetFromRVA(ntHeaders, debugDirRva, &debugDirOffset)) { @@ -221,7 +221,7 @@ static void collectPDBfiles(void *fileMemory, IMAGE_DEBUG_DIRECTORY *directoryBa namespace Debugger { namespace Internal { - + bool getPDBFiles(const QString &peExecutableFileName, QStringList *rc, QString *errorMessage) { HANDLE hFile = NULL; diff --git a/src/plugins/debugger/shared/peutils.h b/src/plugins/debugger/shared/peutils.h index c2deef4a51051ab164d4c00f881e1a41aead793e..5a6fadaf581ade3f9c1f4ffc3e059280ebfd539d 100644 --- a/src/plugins/debugger/shared/peutils.h +++ b/src/plugins/debugger/shared/peutils.h @@ -45,7 +45,7 @@ namespace Internal { // Return a list of Program-Database (*.pdb) files a PE executable refers to. */ bool getPDBFiles(const QString &peExecutableFileName, QStringList *rc, QString *errorMessage); -} // namespace Internal +} // namespace Internal } // namespace Debugger #endif // DEBUGGER_PEUTILS_H diff --git a/src/plugins/debugger/shared/shared.pri b/src/plugins/debugger/shared/shared.pri index bd69e956ce09eb199097c5703e0928006666155b..760b012a447ee4638fbd917b23150998504b059f 100644 --- a/src/plugins/debugger/shared/shared.pri +++ b/src/plugins/debugger/shared/shared.pri @@ -1,7 +1,7 @@ SOURCES += $$PWD/backtrace.cpp -HEADERS += $$PWD/backtrace.h +HEADERS += $$PWD/backtrace.h win32 { @@ -19,6 +19,6 @@ contains(QMAKE_CXX, cl) { # For the Privilege manipulation functions in sharedlibraryinjector.cpp. # Not required for MinGW. LIBS += advapi32.lib -} +} } diff --git a/src/plugins/debugger/sourcefileswindow.cpp b/src/plugins/debugger/sourcefileswindow.cpp index 52341c6285297c96df2a8041d9c4fd9cb8455136..f429320fe19b08145bfba7b5ac2974a12a1b2f8c 100644 --- a/src/plugins/debugger/sourcefileswindow.cpp +++ b/src/plugins/debugger/sourcefileswindow.cpp @@ -95,7 +95,7 @@ QVariant SourceFilesModel::headerData(int section, { if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { static QString headers[] = { - tr("Internal name") + " ", + tr("Internal name") + " ", tr("Full name") + " ", }; return headers[section]; @@ -178,7 +178,7 @@ SourceFilesWindow::SourceFilesWindow(QWidget *parent) setRootIsDecorated(false); setIconSize(QSize(10, 10)); //header()->setDefaultAlignment(Qt::AlignLeft); - + connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(sourceFileActivated(QModelIndex))); connect(act, SIGNAL(toggled(bool)), @@ -210,7 +210,7 @@ void SourceFilesWindow::contextMenuEvent(QContextMenuEvent *ev) act2 = new QAction(tr("Open file \"%1\"'").arg(name), &menu); act2->setEnabled(true); } - + menu.addAction(act1); menu.addAction(act2); menu.addSeparator(); @@ -235,5 +235,5 @@ void SourceFilesWindow::removeAll() m_model->setSourceFiles(QMap<QString, QString>()); header()->setResizeMode(0, QHeaderView::ResizeToContents); } - + #include "sourcefileswindow.moc" diff --git a/src/plugins/debugger/sourcefileswindow.h b/src/plugins/debugger/sourcefileswindow.h index 9a003eab30a9a9bdacef00472901722a4a652d84..d5be1b6741bc50317cba06d76ac66a00162ed98f 100644 --- a/src/plugins/debugger/sourcefileswindow.h +++ b/src/plugins/debugger/sourcefileswindow.h @@ -43,7 +43,7 @@ namespace Debugger { namespace Internal { class SourceFilesModel; - + class SourceFilesWindow : public QTreeView { Q_OBJECT diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp index d2b146b91349b1a4613781b033965f0ba183343a..08985110d66c7453ab55107f2869bf7806fc734b 100644 --- a/src/plugins/debugger/stackhandler.cpp +++ b/src/plugins/debugger/stackhandler.cpp @@ -139,9 +139,9 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const return QVariant(); if (index.row() == m_stackFrames.size()) { - if (role == Qt::DisplayRole && index.column() == 0) + if (role == Qt::DisplayRole && index.column() == 0) return tr("..."); - if (role == Qt::DisplayRole && index.column() == 1) + if (role == Qt::DisplayRole && index.column() == 1) return tr("<More>"); if (role == Qt::DecorationRole && index.column() == 0) return m_emptyIcon; @@ -209,7 +209,7 @@ Qt::ItemFlags StackHandler::flags(const QModelIndex &index) const } StackFrame StackHandler::currentFrame() const -{ +{ QTC_ASSERT(m_currentIndex >= 0, return StackFrame()); QTC_ASSERT(m_currentIndex < m_stackFrames.size(), return StackFrame()); return m_stackFrames.at(m_currentIndex); diff --git a/src/plugins/debugger/stackwindow.cpp b/src/plugins/debugger/stackwindow.cpp index afc5d257294c68613a446dd050320e28ec497ecf..d39172f1ea97f685cc51a32814c36bcfad2caeba 100644 --- a/src/plugins/debugger/stackwindow.cpp +++ b/src/plugins/debugger/stackwindow.cpp @@ -93,7 +93,7 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev) QModelIndex idx = indexAt(ev->pos()); StackFrame frame = model()->data(idx, Qt::UserRole).value<StackFrame>(); QString address = frame.address; - + QMenu menu; menu.addAction(theDebuggerAction(ExpandStack)); @@ -107,7 +107,7 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev) actShowMemory->setEnabled(false); } else { actShowMemory->setText(tr("Open memory editor at %1").arg(address)); - } + } QAction *actShowDisassembler = menu.addAction(QString()); if (address.isEmpty()) { diff --git a/src/plugins/debugger/stackwindow.h b/src/plugins/debugger/stackwindow.h index 7ea221d6fedb01bf55404ecb6b58cc30a553c1e9..c8e847b08aa8f36bee835cc460fac25ad2cad620 100644 --- a/src/plugins/debugger/stackwindow.h +++ b/src/plugins/debugger/stackwindow.h @@ -43,7 +43,7 @@ class DebuggerManager; namespace Internal { class DisassemblerViewAgent; - + class StackWindow : public QTreeView { Q_OBJECT diff --git a/src/plugins/debugger/threadswindow.h b/src/plugins/debugger/threadswindow.h index 0d47e3687cbbe1b40dd02cc6921501d825696f86..bc1a252be26f9da349b8bf12708ca7ac7577602c 100644 --- a/src/plugins/debugger/threadswindow.h +++ b/src/plugins/debugger/threadswindow.h @@ -34,7 +34,7 @@ namespace Debugger { namespace Internal { - + class ThreadsWindow : public QTreeView { Q_OBJECT diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index 982965f42d0c425a42ed3852603452d1072facf5..a1d61cabb73b4aa9f147d4340215c9ea8cff65d8 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -61,7 +61,7 @@ #if DEBUG_MODEL # define MODEL_DEBUG(s) qDebug() << s #else -# define MODEL_DEBUG(s) +# define MODEL_DEBUG(s) #endif #define MODEL_DEBUGX(s) qDebug() << s @@ -100,7 +100,7 @@ public: // WatchData // //////////////////////////////////////////////////////////////////// - + WatchData::WatchData() : hasChildren(false), generation(-1), @@ -173,7 +173,7 @@ void WatchData::setValue(const QString &value0) // column. No need to duplicate it here. if (value.startsWith("(" + type + ") 0x")) value = value.section(" ", -1, -1); - + setValueUnneeded(); } @@ -515,7 +515,7 @@ static QString niceTypeHelper(const QString typeIn) for (int i = 0; i < 10; ++i) { int start = type.indexOf("std::allocator<"); if (start == -1) - break; + break; // search for matching '>' int pos; int level = 0; @@ -738,7 +738,7 @@ bool WatchModel::hasChildren(const QModelIndex &parent) const WatchItem *WatchModel::watchItem(const QModelIndex &idx) const { - return idx.isValid() + return idx.isValid() ? static_cast<WatchItem*>(idx.internalPointer()) : m_root; } @@ -747,7 +747,7 @@ QModelIndex WatchModel::watchIndex(const WatchItem *item) const return watchIndexHelper(item, m_root, QModelIndex()); } -QModelIndex WatchModel::watchIndexHelper(const WatchItem *needle, +QModelIndex WatchModel::watchIndexHelper(const WatchItem *needle, const WatchItem *parentItem, const QModelIndex &parentIndex) const { if (needle == parentItem) @@ -762,7 +762,7 @@ QModelIndex WatchModel::watchIndexHelper(const WatchItem *needle, return QModelIndex(); } -void WatchModel::emitDataChanged(int column, const QModelIndex &parentIndex) +void WatchModel::emitDataChanged(int column, const QModelIndex &parentIndex) { QModelIndex idx1 = index(0, column, parentIndex); QModelIndex idx2 = index(rowCount(parentIndex) - 1, column, parentIndex); @@ -841,7 +841,7 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const case ActiveDataRole: qDebug() << "ASK FOR" << data.iname; return true; - + case TypeFormatListRole: if (isIntType(data.type)) return QStringList() << tr("decimal") << tr("hexadecimal") @@ -872,7 +872,7 @@ QVariant WatchModel::data(const QModelIndex &idx, int role) const } default: - break; + break; } return QVariant(); } @@ -890,7 +890,7 @@ bool WatchModel::setData(const QModelIndex &index, const QVariant &value, int ro } } else if (role == TypeFormatRole) { m_handler->setFormat(data.type, value.toInt()); - } else if (role == IndividualFormatRole) { + } else if (role == IndividualFormatRole) { const int format = value.toInt(); if (format == -1) { m_handler->m_individualFormats.remove(data.iname); @@ -944,7 +944,7 @@ QVariant WatchModel::headerData(int section, Qt::Orientation orientation, int ro case 2: return QString(tr("Type") + QLatin1String(" ")); } } - return QVariant(); + return QVariant(); } struct IName : public QByteArray @@ -964,7 +964,7 @@ bool iNameLess(const QString &iname1, const QString &iname2) return i1 < i2; } } - return name1 < name2; + return name1 < name2; } bool operator<(const IName &iname1, const IName &iname2) @@ -981,7 +981,7 @@ static int findInsertPosition(const QList<WatchItem *> &list, const WatchItem *i { QList<WatchItem *>::const_iterator it = qLowerBound(list.begin(), list.end(), item, iNameSorter); - return it - list.begin(); + return it - list.begin(); } void WatchModel::insertData(const WatchData &data) @@ -1032,7 +1032,7 @@ void WatchModel::insertData(const WatchData &data) void WatchModel::insertBulkData(const QList<WatchData> &list) { #if 0 - for (int i = 0; i != list.size(); ++i) + for (int i = 0; i != list.size(); ++i) insertData(list.at(i)); return; #endif @@ -1524,7 +1524,7 @@ WatchModel *WatchHandler::model(WatchType type) const QTC_ASSERT(false, /**/); return 0; } - + WatchModel *WatchHandler::modelForIName(const QByteArray &iname) const { if (iname.startsWith("local")) diff --git a/src/plugins/debugger/watchhandler.h b/src/plugins/debugger/watchhandler.h index f401cf9b6e2583f1adbd195d55c393ec63f3bde5..c033965f019f07c116da9051cb9a59b73136254f 100644 --- a/src/plugins/debugger/watchhandler.h +++ b/src/plugins/debugger/watchhandler.h @@ -112,7 +112,7 @@ public: bool isLocal() const { return iname.startsWith("local."); } bool isWatcher() const { return iname.startsWith("watch."); } bool isValid() const { return !iname.isEmpty(); } - + bool isEqual(const WatchData &other) const; static QString msgNotInScope(); @@ -181,7 +181,7 @@ enum PointerFomat enum DumpableFormat { PrettyFormat = 0, // keep that at 0 as default - PlainFomat, + PlainFomat, }; class WatchModel : public QAbstractItemModel diff --git a/src/plugins/debugger/watchutils.cpp b/src/plugins/debugger/watchutils.cpp index 1aabf139f90c5245820dc9d791d2fa1204ca8c3a..d0dfcd888e52c7a00323066babc1f5fb5102199e 100644 --- a/src/plugins/debugger/watchutils.cpp +++ b/src/plugins/debugger/watchutils.cpp @@ -329,7 +329,7 @@ static void blockRecursion(const CPlusPlus::Overview &overview, it = seenHash->insert(name, 0); } else { ++(it.value()); - } + } // Is the declaration on or past the current line, that is, // the variable not initialized. if (symbol->line() >= line) @@ -1396,7 +1396,7 @@ static void gbdMiToWatchData(const GdbMi &root, { if (debug > 1) qDebug() << Q_FUNC_INFO << '\n' << root.toString(false, 0); - WatchData w; + WatchData w; QString v; QByteArray b; // Check for name/iname and use as expression default @@ -1438,7 +1438,7 @@ static void gbdMiToWatchData(const GdbMi &root, w.exp = b; gdbMiGetByteArrayValue(&w.addr, root, "addr"); gdbMiGetByteArrayValue(&w.saddr, root, "saddr"); - gdbMiGetBoolValue(&w.valueEnabled, root, "valueenabled"); + gdbMiGetBoolValue(&w.valueEnabled, root, "valueenabled"); gdbMiGetBoolValue(&w.valueEditable, root, "valueeditable"); if (gdbMiGetStringValue(&v, root, "valuetooltip", "valuetooltipencoded")) w.setValue(v); diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp index d763c84ffda2b0095d35357e29fde1daad3b0a42..b259c4c22e954a869291c3d53263c820e017a51e 100644 --- a/src/plugins/debugger/watchwindow.cpp +++ b/src/plugins/debugger/watchwindow.cpp @@ -76,7 +76,7 @@ public: { QLineEdit *lineEdit = qobject_cast<QLineEdit *>(editor); QTC_ASSERT(lineEdit, return); - if (index.column() == 1) + if (index.column() == 1) lineEdit->setText(index.model()->data(index, Qt::DisplayRole).toString()); else lineEdit->setText(index.model()->data(index, ExpressionRole).toString()); @@ -140,15 +140,15 @@ WatchWindow::WatchWindow(Type type, DebuggerManager *manager, QWidget *parent) this, SLOT(expandNode(QModelIndex))); connect(this, SIGNAL(collapsed(QModelIndex)), this, SLOT(collapseNode(QModelIndex))); -} - -void WatchWindow::expandNode(const QModelIndex &idx) -{ +} + +void WatchWindow::expandNode(const QModelIndex &idx) +{ model()->setData(idx, true, ExpandedRole); -} - -void WatchWindow::collapseNode(const QModelIndex &idx) -{ +} + +void WatchWindow::collapseNode(const QModelIndex &idx) +{ model()->setData(idx, false, ExpandedRole); } @@ -208,7 +208,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev) QString exp = model()->data(mi0, ExpressionRole).toString(); QString type = model()->data(mi2).toString(); - QStringList alternativeFormats = + QStringList alternativeFormats = model()->data(mi0, TypeFormatListRole).toStringList(); const int typeFormat = qMax(int(DecimalFormat), model()->data(mi0, TypeFormatRole).toInt()); @@ -271,7 +271,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev) menu.addSeparator(); QAction *actWatchOrRemove; - if (m_type == LocalsType) { + if (m_type == LocalsType) { actWatchOrRemove = theDebuggerAction(WatchExpression)->updatedAction(exp); } else { actWatchOrRemove = theDebuggerAction(RemoveWatchExpression)->updatedAction(exp); @@ -296,7 +296,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev) menu.addAction(actClearCodeModelSnapshot); menu.addSeparator(); menu.addAction(theDebuggerAction(UseToolTipsInLocalsView)); - + menu.addAction(theDebuggerAction(AutoDerefPointers)); menu.addAction(theDebuggerAction(ShowStdNamespace)); menu.addAction(theDebuggerAction(ShowQtNamespace)); @@ -334,7 +334,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev) m_manager->clearCppCodeModelSnapshot(); } else if (clearIndividualFormatAction && act == clearIndividualFormatAction) { model()->setData(mi1, -1, IndividualFormatRole); - } else { + } else { for (int i = 0; i != alternativeFormats.size(); ++i) { if (act == typeFormatActions.at(i)) model()->setData(mi1, i, TypeFormatRole); @@ -355,7 +355,7 @@ void WatchWindow::setAlwaysResizeColumnsToContents(bool on) if (!header()) return; m_alwaysResizeColumnsToContents = on; - QHeaderView::ResizeMode mode = on + QHeaderView::ResizeMode mode = on ? QHeaderView::ResizeToContents : QHeaderView::Interactive; header()->setResizeMode(0, mode); header()->setResizeMode(1, mode); diff --git a/src/plugins/debugger/watchwindow.h b/src/plugins/debugger/watchwindow.h index 3e497e6895ef1ce3e4add742e9505d30a7cdc2f5..916e2254dd079bdc66680d1998162a594452fd70 100644 --- a/src/plugins/debugger/watchwindow.h +++ b/src/plugins/debugger/watchwindow.h @@ -53,7 +53,7 @@ public: WatchWindow(Type type, DebuggerManager *manager, QWidget *parent = 0); void setType(Type type) { m_type = type; } Type type() const { return m_type; } - + public slots: void resizeColumnsToContents(); void setAlwaysResizeColumnsToContents(bool on = true); diff --git a/src/plugins/designer/cpp/formclasswizardparameters.cpp b/src/plugins/designer/cpp/formclasswizardparameters.cpp index 6d29aee83c5723f94b547b90865f561a3901d26c..4e5b91a11bf06569f699c57da5f387a2653aaa4a 100644 --- a/src/plugins/designer/cpp/formclasswizardparameters.cpp +++ b/src/plugins/designer/cpp/formclasswizardparameters.cpp @@ -57,7 +57,7 @@ class FormClassWizardGenerationParametersPrivate : public QSharedData { public: FormClassWizardGenerationParametersPrivate(); - void fromSettings(const QSettings *); + void fromSettings(const QSettings *); void toSettings(QSettings *) const; bool equals(const FormClassWizardGenerationParametersPrivate &rhs) const; diff --git a/src/plugins/designer/formtemplatewizardpage.cpp b/src/plugins/designer/formtemplatewizardpage.cpp index 3940f6e35900fbc088eebb0eeb41a85f6a851828..a9f137d7457234a9174d9d6c7f1deeb3ee0e4866 100644 --- a/src/plugins/designer/formtemplatewizardpage.cpp +++ b/src/plugins/designer/formtemplatewizardpage.cpp @@ -327,7 +327,7 @@ QString FormTemplateWizardPage::changeUiClassName(const QString &uiXml, const QS qDebug() << '<' << Q_FUNC_INFO << newUiClassName << rc; return rc; } -#endif // USE_XSLT +#endif // USE_XSLT } // namespace Internal } // namespace Designer diff --git a/src/plugins/designer/formwindoweditor.cpp b/src/plugins/designer/formwindoweditor.cpp index 7738e9dcf10067233b463f0728fe6c3c12f88900..5f3cc0c5665399211590389cb3a42d53f08ef745 100644 --- a/src/plugins/designer/formwindoweditor.cpp +++ b/src/plugins/designer/formwindoweditor.cpp @@ -374,7 +374,7 @@ QString FormWindowEditor::contents() const return QString::null; // Activate once all Qt branches around have integrated 4.5.2 // (Kinetic) -/* +/* #if QT_VERSION > 0x040501 // Quiet save as of Qt 4.5.2 qdesigner_internal::FormWindowBase *fwb = qobject_cast<qdesigner_internal::FormWindowBase *>(m_formWindow); diff --git a/src/plugins/designer/qt_private/formwindowbase_p.h b/src/plugins/designer/qt_private/formwindowbase_p.h index 269931ee7912930c03f90912bdb41db134763b90..0d26c004e6823e1d8631a496c2dfe1310bb76321 100644 --- a/src/plugins/designer/qt_private/formwindowbase_p.h +++ b/src/plugins/designer/qt_private/formwindowbase_p.h @@ -183,7 +183,7 @@ private slots: private: void syncGridFeature(); - FormWindowBasePrivate *m_d; + FormWindowBasePrivate *m_d; }; } // namespace qdesigner_internal diff --git a/src/plugins/fakevim/fakevimactions.cpp b/src/plugins/fakevim/fakevimactions.cpp index c3d9475f837dcc69b5007238fbe48fea79c7350e..eec64d0f7483de6a5d30b14f9c377db243b1df3b 100644 --- a/src/plugins/fakevim/fakevimactions.cpp +++ b/src/plugins/fakevim/fakevimactions.cpp @@ -29,7 +29,7 @@ #include "fakevimactions.h" -// Please do not add any direct dependencies to other Qt Creator code here. +// Please do not add any direct dependencies to other Qt Creator code here. // Instead emit signals and let the FakeVimPlugin channel the information to // Qt Creator. The idea is to keep this file here in a "clean" state that // allows easy reuse with any QTextEdit or QPlainTextEdit derived class. @@ -66,7 +66,7 @@ FakeVimSettings::~FakeVimSettings() { qDeleteAll(m_items); } - + void FakeVimSettings::insertItem(int code, SavedAction *item, const QString &longName, const QString &shortName) { @@ -92,7 +92,7 @@ void FakeVimSettings::writeSettings(QSettings *settings) foreach (SavedAction *item, m_items) item->writeSettings(settings); } - + SavedAction *FakeVimSettings::item(int code) { QTC_ASSERT(m_items.value(code, 0), qDebug() << "CODE: " << code; return 0); diff --git a/src/plugins/fakevim/fakevimactions.h b/src/plugins/fakevim/fakevimactions.h index 023414ef2c84a1a83465d2ffc6d69b2adf6e0b69..d1944fb6d3b5494ca37bd5f315419a31105a60d2 100644 --- a/src/plugins/fakevim/fakevimactions.h +++ b/src/plugins/fakevim/fakevimactions.h @@ -80,9 +80,9 @@ public: void writeSettings(QSettings *settings); private: - QHash<int, Utils::SavedAction *> m_items; - QHash<QString, int> m_nameToCode; - QHash<int, QString> m_codeToName; + QHash<int, Utils::SavedAction *> m_items; + QHash<QString, int> m_nameToCode; + QHash<int, QString> m_codeToName; }; FakeVimSettings *theFakeVimSettings(); diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index 58ad3d67e4187863ca24486e5af7788f399613bb..f032200315755073d3294266284be08002dbd206 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -150,30 +150,30 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent) m_ui.setupUi(w); m_group.clear(); - m_group.insert(theFakeVimSetting(ConfigUseFakeVim), + m_group.insert(theFakeVimSetting(ConfigUseFakeVim), m_ui.groupBox); - m_group.insert(theFakeVimSetting(ConfigExpandTab), + m_group.insert(theFakeVimSetting(ConfigExpandTab), m_ui.checkBoxExpandTab); - m_group.insert(theFakeVimSetting(ConfigHlSearch), + m_group.insert(theFakeVimSetting(ConfigHlSearch), m_ui.checkBoxHlSearch); - m_group.insert(theFakeVimSetting(ConfigShiftWidth), + m_group.insert(theFakeVimSetting(ConfigShiftWidth), m_ui.lineEditShiftWidth); - m_group.insert(theFakeVimSetting(ConfigSmartTab), + m_group.insert(theFakeVimSetting(ConfigSmartTab), m_ui.checkBoxSmartTab); - m_group.insert(theFakeVimSetting(ConfigStartOfLine), + m_group.insert(theFakeVimSetting(ConfigStartOfLine), m_ui.checkBoxStartOfLine); - m_group.insert(theFakeVimSetting(ConfigTabStop), + m_group.insert(theFakeVimSetting(ConfigTabStop), m_ui.lineEditTabStop); - m_group.insert(theFakeVimSetting(ConfigBackspace), + m_group.insert(theFakeVimSetting(ConfigBackspace), m_ui.lineEditBackspace); - m_group.insert(theFakeVimSetting(ConfigAutoIndent), + m_group.insert(theFakeVimSetting(ConfigAutoIndent), m_ui.checkBoxAutoIndent); - m_group.insert(theFakeVimSetting(ConfigSmartIndent), + m_group.insert(theFakeVimSetting(ConfigSmartIndent), m_ui.checkBoxSmartIndent); - m_group.insert(theFakeVimSetting(ConfigIncSearch), + m_group.insert(theFakeVimSetting(ConfigIncSearch), m_ui.checkBoxIncSearch); connect(m_ui.pushButtonCopyTextEditorSettings, SIGNAL(clicked()), @@ -202,9 +202,9 @@ QWidget *FakeVimOptionPage::createPage(QWidget *parent) void FakeVimOptionPage::copyTextEditorSettings() { - TextEditor::TabSettings ts = + TextEditor::TabSettings ts = TextEditor::TextEditorSettings::instance()->tabSettings(); - + m_ui.checkBoxExpandTab->setChecked(ts.m_spacesForTabs); m_ui.lineEditTabStop->setText(QString::number(ts.m_tabSize)); m_ui.lineEditShiftWidth->setText(QString::number(ts.m_indentSize)); @@ -554,7 +554,7 @@ private: } // namespace FakeVim FakeVimPluginPrivate::FakeVimPluginPrivate(FakeVimPlugin *plugin) -{ +{ q = plugin; m_fakeVimOptionsPage = 0; m_fakeVimExCommandsPage = 0; @@ -600,7 +600,7 @@ bool FakeVimPluginPrivate::initialize() m_fakeVimExCommandsPage = new FakeVimExCommandsPage; q->addObject(m_fakeVimExCommandsPage); readSettings(Core::ICore::instance()->settings()); - + Core::Command *cmd = 0; cmd = actionManager->registerAction(theFakeVimSetting(ConfigUseFakeVim), Constants::INSTALL_HANDLER, globalcontext); @@ -799,7 +799,7 @@ void FakeVimPluginPrivate::editorOpened(Core::IEditor *editor) // we can only handle QTextEdit and QPlainTextEdit if (!qobject_cast<QTextEdit *>(widget) && !qobject_cast<QPlainTextEdit *>(widget)) return; - + //qDebug() << "OPENING: " << editor << editor->widget() // << "MODE: " << theFakeVimSetting(ConfigUseFakeVim)->value(); @@ -839,7 +839,7 @@ void FakeVimPluginPrivate::editorOpened(Core::IEditor *editor) handler->setCurrentFileName(editor->file()->fileName()); handler->installEventFilter(); - + // pop up the bar if (theFakeVimSetting(ConfigUseFakeVim)->value().toBool()) showCommandBuffer(QString()); @@ -858,8 +858,8 @@ void FakeVimPluginPrivate::setUseFakeVim(const QVariant &value) if (Find::Internal::FindPlugin::instance()) Find::Internal::FindPlugin::instance()->setUseFakeVim(on); if (on) { - Core::EditorManager::instance()->showEditorStatusBar( - QLatin1String(Constants::MINI_BUFFER), + Core::EditorManager::instance()->showEditorStatusBar( + QLatin1String(Constants::MINI_BUFFER), "vi emulation mode. Type :q to leave. Use , Ctrl-R to trigger run.", tr("Quit FakeVim"), this, SLOT(quitFakeVim())); foreach (Core::IEditor *editor, m_editorToHandler.keys()) @@ -909,7 +909,7 @@ void FakeVimPluginPrivate::writeFile(bool *handled, file->save(fileName); Core::ICore::instance()->fileManager()->unblockFileChange(file); *handled = true; - } + } } void FakeVimPluginPrivate::handleExCommand(const QString &cmd) @@ -1072,7 +1072,7 @@ void FakeVimPluginPrivate::quitFakeVim() void FakeVimPluginPrivate::showCommandBuffer(const QString &contents) { //qDebug() << "SHOW COMMAND BUFFER" << contents; - Core::EditorManager::instance()->showEditorStatusBar( + Core::EditorManager::instance()->showEditorStatusBar( QLatin1String(Constants::MINI_BUFFER), contents, tr("Quit FakeVim"), this, SLOT(quitFakeVim())); } diff --git a/src/plugins/genericprojectmanager/genericprojectfileseditor.h b/src/plugins/genericprojectmanager/genericprojectfileseditor.h index 1a37d2750e066030885e4ebb5d82cb29ef3039f4..b5d7c8f10c1f4d8fc491519cdf7f35a34a137d5d 100644 --- a/src/plugins/genericprojectmanager/genericprojectfileseditor.h +++ b/src/plugins/genericprojectmanager/genericprojectfileseditor.h @@ -51,7 +51,7 @@ class ProjectFilesFactory: public Core::IEditorFactory public: ProjectFilesFactory(Manager *manager, TextEditor::TextEditorActionHandler *handler); virtual ~ProjectFilesFactory(); - + Manager *manager() const; virtual Core::IEditor *createEditor(QWidget *parent); diff --git a/src/plugins/genericprojectmanager/genericprojectwizard.cpp b/src/plugins/genericprojectmanager/genericprojectwizard.cpp index 10a18e14a3c9caadf526c4a84d696acafb0fe5d7..9d38e48e63afb1768f9bf6328ac28ba78aa3d64c 100644 --- a/src/plugins/genericprojectmanager/genericprojectwizard.cpp +++ b/src/plugins/genericprojectmanager/genericprojectwizard.cpp @@ -149,7 +149,7 @@ bool GenericProjectWizard::isValidDir(const QFileInfo &fileInfo) const return false; else if (fileName == QLatin1String("CVS")) - return false; + return false; // ### user include/exclude diff --git a/src/plugins/git/changeselectiondialog.h b/src/plugins/git/changeselectiondialog.h index 33f8cc6972faf2fc1388cb50640c133bb0efea76..4859dfcf6501edb2d28b029a092c7d2002c38b68 100644 --- a/src/plugins/git/changeselectiondialog.h +++ b/src/plugins/git/changeselectiondialog.h @@ -51,7 +51,7 @@ public: public slots: void selectWorkingDirectory(); -private: +private: Ui_ChangeSelectionDialog m_ui; }; diff --git a/src/plugins/git/gitcommand.cpp b/src/plugins/git/gitcommand.cpp index 3c5d29123b72bca13f7a5645c7b337d6ea19187f..fed9d81b6716417c92bd047e0799ec45b23db851 100644 --- a/src/plugins/git/gitcommand.cpp +++ b/src/plugins/git/gitcommand.cpp @@ -149,7 +149,7 @@ void GitCommand::run() output += process.readAllStandardOutput(); error += QString::fromLocal8Bit(process.readAllStandardError()); switch (m_reportTerminationMode) { - case NoReport: + case NoReport: break; case ReportStdout: output += msgTermination(process.exitCode(), m_binaryPath, m_jobs.at(j).arguments).toUtf8(); diff --git a/src/plugins/git/gitorious/gitorioushostwidget.cpp b/src/plugins/git/gitorious/gitorioushostwidget.cpp index a35c7cb7ae55c6dc68a2fec93eba5b1d73c57e9d..26370dccf77aaa982291ce166044db1e8cdb13b9 100644 --- a/src/plugins/git/gitorious/gitorioushostwidget.cpp +++ b/src/plugins/git/gitorious/gitorioushostwidget.cpp @@ -228,7 +228,7 @@ void GitoriousHostWidget::slotBrowse() } void GitoriousHostWidget::slotDelete() -{ +{ const QModelIndex index = ui->hostView->selectionModel()->currentIndex(); ui->hostView->selectionModel()->clear(); if (index.isValid()) { diff --git a/src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp b/src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp index 7893716ddd742c6c734a4ecca89b44fb8a426bd9..239f93328b68191e9fc30ad1826d0cfbeda8f3cb 100644 --- a/src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp +++ b/src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp @@ -80,7 +80,7 @@ GitoriousRepositoryWizardPage::GitoriousRepositoryWizardPage(const GitoriousProj { QStringList headers; headers << tr("Name") << tr("Owner") << tr("Description"); - m_model->setHorizontalHeaderLabels(headers); + m_model->setHorizontalHeaderLabels(headers); // Filter on all columns m_filterModel->setSourceModel(m_model); m_filterModel->setFilterKeyColumn(-1); diff --git a/src/plugins/git/gitplugin.h b/src/plugins/git/gitplugin.h index c7c06f06cc3e943f29634a6cdff20c3c8ec32c17..0e03a6445b0a618fca5d32d589067007d4dd38c1 100644 --- a/src/plugins/git/gitplugin.h +++ b/src/plugins/git/gitplugin.h @@ -86,7 +86,7 @@ public: GitSettings settings() const; void setSettings(const GitSettings &s); - GitClient *gitClient() const; + GitClient *gitClient() const; private slots: void diffCurrentFile(); diff --git a/src/plugins/git/gitsubmiteditorwidget.cpp b/src/plugins/git/gitsubmiteditorwidget.cpp index d735611b6eb361ac5d54a52a067097c1055be5b9..8361b5d1ba905962cfd540189de80d62383657c1 100644 --- a/src/plugins/git/gitsubmiteditorwidget.cpp +++ b/src/plugins/git/gitsubmiteditorwidget.cpp @@ -55,13 +55,13 @@ static QTextCharFormat commentFormat() // keywords (words in front of a colon as in 'Task: <bla>'). class GitSubmitHighlighter : QSyntaxHighlighter { -public: +public: explicit GitSubmitHighlighter(QTextEdit *parent); virtual void highlightBlock(const QString &text); private: enum State { Header, Comment, Other }; - const QTextCharFormat m_commentFormat; + const QTextCharFormat m_commentFormat; const QRegExp m_keywordPattern; const QChar m_hashChar; }; @@ -87,7 +87,7 @@ void GitSubmitHighlighter::highlightBlock(const QString &text) state = Comment; } // Apply format. - switch (state) { + switch (state) { case Header: { QTextCharFormat charFormat = format(0); charFormat.setFontWeight(QFont::Bold); diff --git a/src/plugins/helloworld/helloworld.pro b/src/plugins/helloworld/helloworld.pro index 82313b6dd17e70c8118cb1e50cabc23c33f67a6d..a4268409e20acd51eef2eaa15a8cd53f55776dbe 100644 --- a/src/plugins/helloworld/helloworld.pro +++ b/src/plugins/helloworld/helloworld.pro @@ -9,4 +9,4 @@ HEADERS += helloworldplugin.h \ SOURCES += helloworldplugin.cpp \ helloworldwindow.cpp - + diff --git a/src/plugins/help/centralwidget.cpp b/src/plugins/help/centralwidget.cpp index 2968d885bae32a68983d819f687622189d9fa89c..44a3869862394671f56e3a2243ecc4c6d092895f 100644 --- a/src/plugins/help/centralwidget.cpp +++ b/src/plugins/help/centralwidget.cpp @@ -435,7 +435,7 @@ void CentralWidget::setSourceInNewTab(const QUrl &url, int zoom) viewer->setZoom(zoom); viewer->setSource(url); viewer->setFocus(Qt::OtherFocusReason); - + #if defined(QT_NO_WEBKIT) QFont font = viewer->font(); font.setPointSize(font.pointSize() + int(zoom)); @@ -560,7 +560,7 @@ void CentralWidget::showTabBarContextMenu(const QPoint &point) closePages->setEnabled(enableAction); menu.addSeparator(); - + QAction *newBookmark = menu.addAction(tr("Add Bookmark for this Page...")); const QString &url = viewer->source().toString(); if (url.isEmpty() || url == QLatin1String("about:blank")) diff --git a/src/plugins/help/generalsettingspage.cpp b/src/plugins/help/generalsettingspage.cpp index 805138143e65eb0eddce20de1704912f73c92229..e1cf795a6ba46ea50d3edddfca1f4cfb83860a2c 100644 --- a/src/plugins/help/generalsettingspage.cpp +++ b/src/plugins/help/generalsettingspage.cpp @@ -103,7 +103,7 @@ QWidget *GeneralSettingsPage::createPage(QWidget *parent) QString homePage = m_helpEngine->customValue(QLatin1String("HomePage"), QString()).toString(); - + if (homePage.isEmpty()) { homePage = m_helpEngine->customValue(QLatin1String("DefaultHomePage"), QLatin1String("about:blank")).toString(); @@ -116,7 +116,7 @@ QWidget *GeneralSettingsPage::createPage(QWidget *parent) index = m_helpEngine->customValue(QLatin1String("ContextHelpOption"), 0).toInt(); m_ui.contextHelpComboBox->setCurrentIndex(index); - + connect(m_ui.currentPageButton, SIGNAL(clicked()), this, SLOT(setCurrentPage())); connect(m_ui.blankPageButton, SIGNAL(clicked()), this, SLOT(setBlankPage())); connect(m_ui.defaultPageButton, SIGNAL(clicked()), this, SLOT(setDefaultPage())); diff --git a/src/plugins/help/openedviewerswidget.h b/src/plugins/help/openedviewerswidget.h index e37a5310bf8810b0f69b3b47d3b183ca4050d5f1..3891c94f93397e9700028b50ebcb7e2194435871 100644 --- a/src/plugins/help/openedviewerswidget.h +++ b/src/plugins/help/openedviewerswidget.h @@ -40,7 +40,7 @@ namespace Help { namespace Internal { class OpenedViewersDelegate : public QStyledItemDelegate -{ +{ Q_OBJECT public: OpenedViewersDelegate(QObject *parent = 0); diff --git a/src/plugins/mercurial/mercurialclient.cpp b/src/plugins/mercurial/mercurialclient.cpp index 59b13b9eb4b62ee9329140056edf55d8e7b5ac6b..37aab25cdc1942589f2d3da18b4f8ca7f9dfbb32 100644 --- a/src/plugins/mercurial/mercurialclient.cpp +++ b/src/plugins/mercurial/mercurialclient.cpp @@ -355,7 +355,7 @@ void MercurialClient::revert(const QString &workingDir, const QString &revision, const QVariant &cookie) { - QStringList args(QLatin1String("revert")); + QStringList args(QLatin1String("revert")); if (!revision.isEmpty()) args << QLatin1String("-r") << revision; args.append(argument); diff --git a/src/plugins/mercurial/mercurialjobrunner.cpp b/src/plugins/mercurial/mercurialjobrunner.cpp index 29595a83d9646a9c41820449973c78284868014e..eb41c54fc0a2c7f14b514b6c3d17b345bb723ab2 100644 --- a/src/plugins/mercurial/mercurialjobrunner.cpp +++ b/src/plugins/mercurial/mercurialjobrunner.cpp @@ -196,7 +196,7 @@ void MercurialJobRunner::task(const QSharedPointer<HgTask> &job) hgProcess.start(binary, args); - if (!hgProcess.waitForStarted()) { + if (!hgProcess.waitForStarted()) { emit error(msgStartFailed(binary, hgProcess.errorString())); return; } diff --git a/src/plugins/perforce/perforcesubmiteditorwidget.h b/src/plugins/perforce/perforcesubmiteditorwidget.h index 6afeca66aa99b398620b5c2599bdd77b5d4f44a5..cec80ecad31b0b76e601386eceba8af536a5b279 100644 --- a/src/plugins/perforce/perforcesubmiteditorwidget.h +++ b/src/plugins/perforce/perforcesubmiteditorwidget.h @@ -35,7 +35,7 @@ namespace Perforce { namespace Internal { - + /* Submit editor widget with additional information pane * at the top. */ class PerforceSubmitEditorWidget : public Utils::SubmitEditorWidget diff --git a/src/plugins/projectexplorer/baseprojectwizarddialog.cpp b/src/plugins/projectexplorer/baseprojectwizarddialog.cpp index 27014eb14d2c637333b2f7188dca4c54dee0055c..9f5b8bd3c50849d3c8aba60041611caf903aa5c4 100644 --- a/src/plugins/projectexplorer/baseprojectwizarddialog.cpp +++ b/src/plugins/projectexplorer/baseprojectwizarddialog.cpp @@ -38,7 +38,7 @@ namespace ProjectExplorer { -struct BaseProjectWizardDialogPrivate { +struct BaseProjectWizardDialogPrivate { explicit BaseProjectWizardDialogPrivate(Utils::ProjectIntroPage *page, int id = -1); const int introId; diff --git a/src/plugins/projectexplorer/buildmanager.cpp b/src/plugins/projectexplorer/buildmanager.cpp index ebdb031b9abb5e4ca9dcf28188060894fb5de664..87684a72586ddfe7701547ed889611b4c68f575e 100644 --- a/src/plugins/projectexplorer/buildmanager.cpp +++ b/src/plugins/projectexplorer/buildmanager.cpp @@ -325,7 +325,7 @@ void BuildManager::nextStep() m_watcher.setFuture(QtConcurrent::run(&BuildStep::run, m_currentBuildStep)); } else { m_running = false; - m_previousBuildStepProject = 0; + m_previousBuildStepProject = 0; m_progressFutureInterface->reportFinished(); m_progressWatcher.setFuture(QFuture<void>()); delete m_progressFutureInterface; diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.h b/src/plugins/projectexplorer/customexecutablerunconfiguration.h index 575ccc393675903353bbaceac53bfe7a7a016414..25cf9bbd82eee09a5ce4b7c632acc2eef40cc938 100644 --- a/src/plugins/projectexplorer/customexecutablerunconfiguration.h +++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.h @@ -55,7 +55,7 @@ namespace Internal { class PROJECTEXPLORER_EXPORT CustomExecutableRunConfiguration : public LocalApplicationRunConfiguration { // the configuration widget needs to setExecutable setWorkingDirectory and setCommandLineArguments - friend class Internal::CustomExecutableConfigurationWidget; + friend class Internal::CustomExecutableConfigurationWidget; Q_OBJECT public: diff --git a/src/plugins/projectexplorer/environmenteditmodel.cpp b/src/plugins/projectexplorer/environmenteditmodel.cpp index 13c2c5154f57b1db7e890783a7b60974007abf58..cf81daada0c79eb0d40444a9229d18fbb625ab62 100644 --- a/src/plugins/projectexplorer/environmenteditmodel.cpp +++ b/src/plugins/projectexplorer/environmenteditmodel.cpp @@ -427,7 +427,7 @@ EnvironmentWidget::EnvironmentWidget(QWidget *parent, QWidget *additionalDetails vbox2->addLayout(horizontalLayout); vbox->addWidget(m_detailsContainer); - + connect(m_model, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(updateButtons())); diff --git a/src/plugins/projectexplorer/outputwindow.h b/src/plugins/projectexplorer/outputwindow.h index b5463f883d78862e6a233c77216e2cd88094da81..da7cbd0cfa74c984c5c82315ef8788add83678d7 100644 --- a/src/plugins/projectexplorer/outputwindow.h +++ b/src/plugins/projectexplorer/outputwindow.h @@ -90,7 +90,7 @@ public: void appendOutput(RunControl *rc, const QString &out); void appendOutputInline(RunControl *rc, const QString &out); void showTabFor(RunControl *rc); - + public slots: void projectRemoved(); void coreAboutToClose(); diff --git a/src/plugins/projectexplorer/projectexplorer.h b/src/plugins/projectexplorer/projectexplorer.h index 73859fb83e382964670e786deca89e2f647c4b96..da605c76f2d8b5b9362898ccaf58224d3db61d96 100644 --- a/src/plugins/projectexplorer/projectexplorer.h +++ b/src/plugins/projectexplorer/projectexplorer.h @@ -232,7 +232,7 @@ private: Internal::ProjectFileFactory *findProjectFileFactory(const QString &filename) const; static ProjectExplorerPlugin *m_instance; - ProjectExplorerPluginPrivate *d; + ProjectExplorerPluginPrivate *d; }; } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/projectexplorer.pro b/src/plugins/projectexplorer/projectexplorer.pro index 864b66f7ceba4351211ed617631808408786e772..0902b597f5b7c10024212807b703ecf713deb680 100644 --- a/src/plugins/projectexplorer/projectexplorer.pro +++ b/src/plugins/projectexplorer/projectexplorer.pro @@ -140,7 +140,7 @@ FORMS += processstep.ui \ targetsettingswidget.ui \ doubletabwidget.ui -win32 { +win32 { SOURCES += applicationlauncher_win.cpp \ winguiprocess.cpp HEADERS += winguiprocess.h diff --git a/src/plugins/projectexplorer/projectfilewizardextension.cpp b/src/plugins/projectexplorer/projectfilewizardextension.cpp index c07894ffb6f66e891e6ebff6f450d57746b71409..95c514cb9885b4d92a4bd456e4373b03f3e87051 100644 --- a/src/plugins/projectexplorer/projectfilewizardextension.cpp +++ b/src/plugins/projectexplorer/projectfilewizardextension.cpp @@ -110,7 +110,7 @@ ProjectEntry::ProjectEntry(ProjectNode *n) : fileName = fi.fileName(); baseName = fi.baseName(); if (fi.suffix() != QLatin1String("pro")) - type = PriFile; + type = PriFile; nativeDirectory = QDir::toNativeSeparators(fi.absolutePath()); } diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h index 51cdc2ac6f0b4052ad778b8129831f9990fa32ba..3f17b210130b0882cb675edf20874465cdd12efa 100644 --- a/src/plugins/projectexplorer/runconfiguration.h +++ b/src/plugins/projectexplorer/runconfiguration.h @@ -57,10 +57,10 @@ class BuildConfiguration; * Note that all RunControls and the project hold a shared pointer to the RunConfiguration. * That is the lifetime of the RunConfiguration might exceed the life of the project. * The user might still have a RunControl running (or output tab of that RunControl open) - * and yet unloaded the project. - * Also a RunConfiguration might be already removed from the list of RunConfigurations + * and yet unloaded the project. + * Also a RunConfiguration might be already removed from the list of RunConfigurations * for a project, but stil be runnable via the output tab. - + */ class PROJECTEXPLORER_EXPORT RunConfiguration : public QObject { diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp index 271bc15ea2242f282f1f6919510da24d399177a1..c9b5d9dedf33ac565011db0684a0a5d6b9dfce4a 100644 --- a/src/plugins/projectexplorer/taskwindow.cpp +++ b/src/plugins/projectexplorer/taskwindow.cpp @@ -820,7 +820,7 @@ void TaskDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, painter->drawPixmap(2, opt.rect.top() + 2, icon.pixmap(16, 16)); int width = opt.rect.width() - model->sizeOfFile() - model->sizeOfLineNumber() - 12 - 22; - if (!selected) { + if (!selected) { // in small mode we lay out differently QString bottom = index.data(TaskModel::Description).toString(); painter->drawText(22, 2 + opt.rect.top() + fm.ascent(), bottom); diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp index 295b743917451847981ef10d568a2b91eab7c1e6..5a44108958abf829ca7172d98a831f4ebd031c1c 100644 --- a/src/plugins/projectexplorer/toolchain.cpp +++ b/src/plugins/projectexplorer/toolchain.cpp @@ -399,7 +399,7 @@ QByteArray MSVCToolChain::predefinedMacros() } QByteArray newDefine = "#define " + key + " " + value + '\n'; m_predefinedMacros.append(newDefine); - } + } } QFile::remove(tmpFilePath); } diff --git a/src/plugins/projectexplorer/toolchain.h b/src/plugins/projectexplorer/toolchain.h index 6efdc647b9483a7b0a71ce279464dc6c25c17f3e..f13b2c1d5c4a2e9cbe8d43e74f4033f77c2698cb 100644 --- a/src/plugins/projectexplorer/toolchain.h +++ b/src/plugins/projectexplorer/toolchain.h @@ -84,7 +84,7 @@ public: GCCE = 6, RVCT_ARMV5 = 7, RVCT_ARMV6 = 8, - GCC_MAEMO = 9, + GCC_MAEMO = 9, GCCE_GNUPOC = 10, RVCT_ARMV6_GNUPOC = 11, LAST_VALID = 11, @@ -102,7 +102,7 @@ public: ToolChain(); virtual ~ToolChain(); - + static bool equals(ToolChain *, ToolChain *); // Factory methods static ToolChain *createGccToolChain(const QString &gcc); diff --git a/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp b/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp index f720fc8278d6c14eeceec7160fe3b768e41036ef..d988c1605a1795e1afa979feb2867df5e693691e 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp @@ -66,7 +66,7 @@ class Actions : public QmlConcreteList<Action *> virtual void clear() { QmlConcreteList<Action *>::clear(); - + while (!widget->actions().empty()) widget->removeAction(widget->actions().first()); //menu->clear(); @@ -588,7 +588,7 @@ private: //if not for the at() function, we could use QmlList instead QMenu *menu; - + }; class QToolButtonDeclarativeUI : public QObject diff --git a/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp b/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp index 7e16e6b16389f6544fc84d67f174238151acd12b..7c5248035e6ae779b01e1c9bab8598b5066a5f29 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp @@ -59,7 +59,7 @@ ColorWidget::ColorWidget(QWidget *parent) : m_colorButton->setStyleSheet(""); m_gradientButton->setIcon(QIcon(":/images/gradient.png")); - + m_gradientButton->setFixedHeight(32); m_gradientButton->setFixedWidth(100); m_gradientButton->setStyleSheet(""); diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h index 7da8f9d4b42856e4ecebf03a8673806ac2b6d454..2ff94fac60ba65dfce2fca9ea7425eb252deb193 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h @@ -77,7 +77,7 @@ private: class PropertyEditorValue : public QObject -{ +{ Q_OBJECT Q_PROPERTY(QVariant value READ value WRITE setValueWithEmit NOTIFY valueChanged) Q_PROPERTY(QString expression READ expression WRITE setExpressionWithEmit NOTIFY expressionChanged FINAL) diff --git a/src/plugins/qmldesigner/config.pri b/src/plugins/qmldesigner/config.pri index c96394ccd4ba1110fc0873841c2ce26283e63ae2..bad98f71326421f75ba31ef9cbb7228a7df7e1ba 100644 --- a/src/plugins/qmldesigner/config.pri +++ b/src/plugins/qmldesigner/config.pri @@ -7,7 +7,7 @@ debug { DEFINES += VIEWLOGGER } -linux-g++-64 { +linux-g++-64 { // note that -Werror = return-type \ is \ only \ diff --git a/src/plugins/qmldesigner/core/model/propertyparser.cpp b/src/plugins/qmldesigner/core/model/propertyparser.cpp index 1773cbdbaa296dcd7d709e34a5fbda56a889a407..dd9ba6f4c02adf94a4076625c612a8340a2e36a0 100644 --- a/src/plugins/qmldesigner/core/model/propertyparser.cpp +++ b/src/plugins/qmldesigner/core/model/propertyparser.cpp @@ -87,7 +87,7 @@ QVariant read(const QString &typeStr, const QString &str) break; case QMetaType::QRectF: value = QmlStringConverters::rectFFromString(str, &conversionOk); - break; + break; case QMetaType::QUrl: value = QVariant(QUrl(str)); break; diff --git a/src/plugins/qmlinspector/components/canvasframerate.cpp b/src/plugins/qmlinspector/components/canvasframerate.cpp index 91c762fad5e1306af3b5e581ececaef993c0c61d..ef08ce562738573703a14c16394d2ab4e61e0d02 100644 --- a/src/plugins/qmlinspector/components/canvasframerate.cpp +++ b/src/plugins/qmlinspector/components/canvasframerate.cpp @@ -79,7 +79,7 @@ private: void drawSample(QPainter *, int, const QRect &, QList<QRect> *); void drawTime(QPainter *, const QRect &); QRect findContainingRect(const QList<QRect> &rects, const QPoint &pos) const; - struct Sample { + struct Sample { int sample[3]; bool isBreak; }; @@ -106,7 +106,7 @@ QLineGraph::QLineGraph(QAbstractSlider *slider, QWidget *parent) slider->setMaximum(0); slider->setMinimum(0); slider->setSingleStep(1); - + connect(slider, SIGNAL(valueChanged(int)), this, SLOT(sliderChanged(int))); } @@ -119,9 +119,9 @@ void QLineGraph::sliderChanged(int v) position = -1; else position = v; - + update(); - + // update highlightedRect QPoint pos = mapFromGlobal(QCursor::pos()); if (geometry().contains(pos)) { @@ -152,7 +152,7 @@ void QLineGraph::updateSlider() slider->setValue(slider->maximum()); } else { slider->setValue(position); - } + } ignoreScroll = false; } @@ -331,7 +331,7 @@ QRect QLineGraph::findContainingRect(const QList<QRect> &rects, const QPoint &po { for (int i=0; i<rects.count(); ++i) { if (rects[i].contains(pos)) - return rects[i]; + return rects[i]; } return QRect(); } @@ -391,7 +391,7 @@ QSize GraphWindow::sizeHint() const { return QSize(400, 220); } - + class CanvasFrameRatePlugin : public QmlDebugClient { @@ -457,7 +457,7 @@ CanvasFrameRate::CanvasFrameRate(QWidget *parent) QPushButton *pb = new QPushButton(tr("New Graph"), this); connect(pb, SIGNAL(clicked()), this, SLOT(newTab())); bottom->addWidget(pb); - + m_group = new QGroupBox(tr("Enabled")); m_group->setCheckable(true); m_group->setChecked(false); @@ -468,7 +468,7 @@ CanvasFrameRate::CanvasFrameRate(QWidget *parent) groupLayout->setSpacing(2); groupLayout->addWidget(m_tabs); groupLayout->addLayout(bottom); - + QVBoxLayout *layout = new QVBoxLayout; layout->setContentsMargins(0, 10, 0, 0); layout->setSpacing(0); @@ -503,7 +503,7 @@ void CanvasFrameRate::connectionStateChanged(QAbstractSocket::SocketState state) m_plugin = 0; } else if (state == QAbstractSocket::ConnectedState) { handleConnected(qobject_cast<QmlDebugConnection*>(sender())); - } + } } void CanvasFrameRate::handleConnected(QmlDebugConnection *conn) diff --git a/src/plugins/qmlinspector/components/canvasframerate.h b/src/plugins/qmlinspector/components/canvasframerate.h index 88335a6df027b5439589d6004a9630fcbae75c1b..57ac20df6b791f7fe2d4a289659a11d0b238e56c 100644 --- a/src/plugins/qmlinspector/components/canvasframerate.h +++ b/src/plugins/qmlinspector/components/canvasframerate.h @@ -51,7 +51,7 @@ class CanvasFrameRate : public QWidget Q_OBJECT public: CanvasFrameRate(QWidget *parent = 0); - + void reset(QmlDebugConnection *conn); void setSizeHint(const QSize &); diff --git a/src/plugins/qmlinspector/components/engine.cpp b/src/plugins/qmlinspector/components/engine.cpp index 1a768d4e3b4979c3a692bd372bf9c316423a1b08..707a4a012e086b3641e07f06e6a663f8417616c3 100644 --- a/src/plugins/qmlinspector/components/engine.cpp +++ b/src/plugins/qmlinspector/components/engine.cpp @@ -115,17 +115,17 @@ EnginePane::EnginePane(QmlDebugConnection *conn, QWidget *parent) connect(m_watchTableView, SIGNAL(objectActivated(int)), m_objTree, SLOT(setCurrentObject(int))); - + m_exprQueryWidget = new ExpressionQueryWidget(ExpressionQueryWidget::SeparateEntryMode, m_client); connect(m_objTree, SIGNAL(currentObjectChanged(QmlDebugObjectReference)), m_exprQueryWidget, SLOT(setCurrentObject(QmlDebugObjectReference))); - + QSplitter *propertiesTab = new QSplitter(Qt::Vertical); propertiesTab->addWidget(m_propertiesView); propertiesTab->addWidget(m_exprQueryWidget); propertiesTab->setStretchFactor(0, 2); propertiesTab->setStretchFactor(1, 1); - + m_tabs = new QTabWidget(this); m_tabs->addTab(propertiesTab, tr("Properties")); m_tabs->addTab(m_watchTableView, tr("Watched")); @@ -176,7 +176,7 @@ void EnginePane::refreshEngines() if (!m_engines->isWaiting()) enginesChanged(); else - QObject::connect(m_engines, SIGNAL(stateChanged(QmlDebugQuery::State)), + QObject::connect(m_engines, SIGNAL(stateChanged(QmlDebugQuery::State)), this, SLOT(enginesChanged())); } diff --git a/src/plugins/qmlinspector/components/expressionquerywidget.cpp b/src/plugins/qmlinspector/components/expressionquerywidget.cpp index 94299c0b02940047df7a310ecdaf568b003ab3cf..d55e4ded6a23d2c22c7cc9ad334c6f955c50d93c 100644 --- a/src/plugins/qmlinspector/components/expressionquerywidget.cpp +++ b/src/plugins/qmlinspector/components/expressionquerywidget.cpp @@ -148,7 +148,7 @@ void ExpressionQueryWidget::executeExpression() { if (!m_client) return; - + if (m_mode == SeparateEntryMode) m_expr = m_lineEdit->text().trimmed(); else @@ -176,7 +176,7 @@ void ExpressionQueryWidget::showResult() m_textEdit->moveCursor(QTextCursor::End); QVariant value = m_query->result(); QString result; - + if (value.type() == QVariant::List || value.type() == QVariant::StringList) { result = tr("<%1 items>", "%1 = number of items").arg(value.toList().count()); } else if (value.isNull()) { diff --git a/src/plugins/qmlinspector/components/expressionquerywidget.h b/src/plugins/qmlinspector/components/expressionquerywidget.h index f2315b54596a8d46332980312d4d1c8fa7ec5ed9..3d98aae534216049c6d1f6fae7a3c622bbcd33a5 100644 --- a/src/plugins/qmlinspector/components/expressionquerywidget.h +++ b/src/plugins/qmlinspector/components/expressionquerywidget.h @@ -51,7 +51,7 @@ public: }; ExpressionQueryWidget(Mode mode = SeparateEntryMode, QmlEngineDebug *client = 0, QWidget *parent = 0); - + void setEngineDebug(QmlEngineDebug *client); void clear(); diff --git a/src/plugins/qmlinspector/components/objectpropertiesview.cpp b/src/plugins/qmlinspector/components/objectpropertiesview.cpp index b82a9b30706ada345395b9b100c465cd8945285a..c6c98dfbd1ccac311851ecdaeacd0e017a47d1ef 100644 --- a/src/plugins/qmlinspector/components/objectpropertiesview.cpp +++ b/src/plugins/qmlinspector/components/objectpropertiesview.cpp @@ -49,7 +49,7 @@ public: BindingType, OtherType }; - + PropertiesViewItem(QTreeWidget *widget, Type type = OtherType); PropertiesViewItem(QTreeWidgetItem *parent, Type type = OtherType); @@ -151,20 +151,20 @@ void ObjectPropertiesView::setPropertyValue(PropertiesViewItem *item, const QVar if (bindingItem && bindingItem->type != PropertiesViewItem::BindingType) { delete bindingItem; bindingItem = 0; - } - + } + qDeleteAll(item->takeChildren()); - + QVariantList variants = value.toList(); item->setText(1, tr("<%1 items>", "%1 = number of items").arg(variants.count())); item->setText(2, QString::fromUtf8(value.typeName())); - + PropertiesViewItem *child; for (int i=0; i<variants.count(); ++i) { child = new PropertiesViewItem(item); setPropertyValue(child, variants[i], makeGray); } - + if (bindingItem) item->addChild(bindingItem); @@ -173,11 +173,11 @@ void ObjectPropertiesView::setPropertyValue(PropertiesViewItem *item, const QVar item->setText(1, (value.isNull() ? QLatin1String("<no value>") : value.toString())); item->setExpanded(true); } - + if (makeGray) { for (int i=0; i<m_tree->columnCount(); ++i) item->setForeground(i, Qt::gray); - } + } } void ObjectPropertiesView::setObject(const QmlDebugObjectReference &object) @@ -194,7 +194,7 @@ void ObjectPropertiesView::setObject(const QmlDebugObjectReference &object) item->setText(0, p.name()); item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - + setPropertyValue(item, p.value(), !p.hasNotifySignal()); item->setText(2, p.valueTypeName()); diff --git a/src/plugins/qmlinspector/components/objectpropertiesview.h b/src/plugins/qmlinspector/components/objectpropertiesview.h index 2def0b57ccc650c9cf252530c9ba2aa632d2b963..ea6039ef3418396ae0e970998b9d54bb7431a0bb 100644 --- a/src/plugins/qmlinspector/components/objectpropertiesview.h +++ b/src/plugins/qmlinspector/components/objectpropertiesview.h @@ -48,7 +48,7 @@ public: void setEngineDebug(QmlEngineDebug *client); void clear(); - + signals: void activated(const QmlDebugObjectReference &, const QmlDebugPropertyReference &); diff --git a/src/plugins/qmlinspector/components/objecttree.cpp b/src/plugins/qmlinspector/components/objecttree.cpp index cb27f81892669889cb939039228245ae1dda3988..05f4fc2d18e913872e71f1f402b854ae659741ad 100644 --- a/src/plugins/qmlinspector/components/objecttree.cpp +++ b/src/plugins/qmlinspector/components/objecttree.cpp @@ -52,7 +52,7 @@ ObjectTree::ObjectTree(QmlEngineDebug *client, QWidget *parent) connect(this, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), SLOT(currentItemChanged(QTreeWidgetItem *))); connect(this, SIGNAL(itemActivated(QTreeWidgetItem *, int)), - SLOT(activated(QTreeWidgetItem *))); + SLOT(activated(QTreeWidgetItem *))); } void ObjectTree::setEngineDebug(QmlEngineDebug *client) @@ -64,7 +64,7 @@ void ObjectTree::reload(int objectDebugId) { if (!m_client) return; - + if (m_query) { delete m_query; m_query = 0; @@ -74,7 +74,7 @@ void ObjectTree::reload(int objectDebugId) if (!m_query->isWaiting()) objectFetched(); else - QObject::connect(m_query, SIGNAL(stateChanged(QmlDebugQuery::State)), + QObject::connect(m_query, SIGNAL(stateChanged(QmlDebugQuery::State)), this, SLOT(objectFetched())); } @@ -150,7 +150,7 @@ void ObjectTree::buildTree(const QmlDebugObjectReference &obj, QTreeWidgetItem * void ObjectTree::dump(const QmlDebugContextReference &ctxt, int ind) { QByteArray indent(ind * 4, ' '); - qWarning().nospace() << indent.constData() << ctxt.debugId() << " " + qWarning().nospace() << indent.constData() << ctxt.debugId() << " " << qPrintable(ctxt.name()); for (int ii = 0; ii < ctxt.contexts().count(); ++ii) @@ -164,7 +164,7 @@ void ObjectTree::dump(const QmlDebugObjectReference &obj, int ind) { QByteArray indent(ind * 4, ' '); qWarning().nospace() << indent.constData() << qPrintable(obj.className()) - << " " << qPrintable(obj.name()) << " " + << " " << qPrintable(obj.name()) << " " << obj.debugId(); for (int ii = 0; ii < obj.children().count(); ++ii) @@ -212,8 +212,8 @@ void ObjectTree::mousePressEvent(QMouseEvent *me) bool ok = false; QString watch = QInputDialog::getText(this, tr("Watch expression"), tr("Expression:"), QLineEdit::Normal, QString(), &ok); - if (ok && !watch.isEmpty()) + if (ok && !watch.isEmpty()) emit expressionWatchRequested(obj, watch); } - } + } } diff --git a/src/plugins/qmlinspector/components/objecttree.h b/src/plugins/qmlinspector/components/objecttree.h index d7ac02c025984762c85c2fadf63eacfd99c3897f..0168f3e0f43c1675c29b5a649f9098e31092c2d9 100644 --- a/src/plugins/qmlinspector/components/objecttree.h +++ b/src/plugins/qmlinspector/components/objecttree.h @@ -49,7 +49,7 @@ public: ObjectTree(QmlEngineDebug *client = 0, QWidget *parent = 0); void setEngineDebug(QmlEngineDebug *client); - + signals: void currentObjectChanged(const QmlDebugObjectReference &); void activated(const QmlDebugObjectReference &); diff --git a/src/plugins/qmlinspector/components/standalone.pro b/src/plugins/qmlinspector/components/standalone.pro index 72d051f3154feefafadf30bfd882c46a214e7124..e9afb0b0abe37109897f06fb469479315e1bc640 100644 --- a/src/plugins/qmlinspector/components/standalone.pro +++ b/src/plugins/qmlinspector/components/standalone.pro @@ -8,7 +8,7 @@ HEADERS += $$PWD/qmldebugger.h \ SOURCES += $$PWD/qmldebugger.cpp \ $$PWD/engine.cpp \ - $$PWD/main.cpp + $$PWD/main.cpp RESOURCES += $$PWD/qmldebugger.qrc OTHER_FILES += $$PWD/engines.qml diff --git a/src/plugins/qmlinspector/components/watchtable.cpp b/src/plugins/qmlinspector/components/watchtable.cpp index 991c44b63d336199e3ee5f8d5c115633c159df4a..70ec72c82b0cb94e94c93dd32df09f8dbbdddd18 100644 --- a/src/plugins/qmlinspector/components/watchtable.cpp +++ b/src/plugins/qmlinspector/components/watchtable.cpp @@ -46,7 +46,7 @@ WatchTableModel::WatchTableModel(QmlEngineDebug *client, QObject *parent) } WatchTableModel::~WatchTableModel() -{ +{ for (int i=0; i<m_columns.count(); ++i) delete m_columns[i].watch; } @@ -263,7 +263,7 @@ void WatchTableModel::expressionWatchRequested(const QmlDebugObjectReference &ob { if (!m_client) return; - + QmlDebugWatch *watch = m_client->addWatch(obj, expr, this); if (watch->state() == QmlDebugWatch::Dead) { @@ -279,7 +279,7 @@ void WatchTableModel::removeWatchAt(int column) { if (!m_client) return; - + QmlDebugWatch *watch = findWatch(column); if (watch) { m_client->removeWatch(watch); @@ -293,7 +293,7 @@ void WatchTableModel::removeAllWatches() for (int i=0; i<m_columns.count(); ++i) { if (m_client) m_client->removeWatch(m_columns[i].watch); - else + else delete m_columns[i].watch; } m_columns.clear(); @@ -323,7 +323,7 @@ void WatchTableHeaderView::mousePressEvent(QMouseEvent *me) if (QMenu::exec(actions, me->globalPos())) m_model->removeWatchAt(col); } - } + } } diff --git a/src/plugins/qmlinspector/components/watchtable.h b/src/plugins/qmlinspector/components/watchtable.h index e2602671095ea10e20c449e102f8c16a10d971da..9611b12693c868a4c9177990f0a5f3be528d2fa1 100644 --- a/src/plugins/qmlinspector/components/watchtable.h +++ b/src/plugins/qmlinspector/components/watchtable.h @@ -53,7 +53,7 @@ public: ~WatchTableModel(); void setEngineDebug(QmlEngineDebug *client); - + QmlDebugWatch *findWatch(int column) const; int columnForWatch(QmlDebugWatch *watch) const; diff --git a/src/plugins/qmlinspector/inspectoroutputpane.h b/src/plugins/qmlinspector/inspectoroutputpane.h index 3b5b299d508abbc1a2a7d03af68419238c7c9428..873aa54155c09848d4c71584a275ea6014c16cb1 100644 --- a/src/plugins/qmlinspector/inspectoroutputpane.h +++ b/src/plugins/qmlinspector/inspectoroutputpane.h @@ -27,7 +27,7 @@ ** **************************************************************************/ #ifndef INSPECTOROUTPUTPANE_H -#define INSPECTOROUTPUTPANE_H +#define INSPECTOROUTPUTPANE_H #include <coreplugin/ioutputpane.h> diff --git a/src/plugins/qmlinspector/qmlinspector.h b/src/plugins/qmlinspector/qmlinspector.h index 9c01ab771cb913f8a1ec13078328b18f7fef5cb9..e680a0174447f0e20af32450ab7eec5c6826ac92 100644 --- a/src/plugins/qmlinspector/qmlinspector.h +++ b/src/plugins/qmlinspector/qmlinspector.h @@ -38,13 +38,13 @@ namespace QmlInspector { const char * const C_INSPECTOR = "QmlInspector"; }; - + class StartParameters { public: StartParameters() : port(0) {} ~StartParameters() {} - + QString address; quint16 port; }; diff --git a/src/plugins/qmlinspector/qmlinspectormode.cpp b/src/plugins/qmlinspector/qmlinspectormode.cpp index 0d3b72b3d359bb076db6065cdf377dad98a186c3..3c9032b88f206d2affa30b82fa29a23433db3526 100644 --- a/src/plugins/qmlinspector/qmlinspectormode.cpp +++ b/src/plugins/qmlinspector/qmlinspectormode.cpp @@ -157,7 +157,7 @@ QmlInspectorMode::QmlInspectorMode(QObject *parent) m_client(0), m_engineQuery(0), m_contextQuery(0) -{ +{ m_watchTableModel = new WatchTableModel(0, this); setWidget(createModeWindow()); @@ -240,7 +240,7 @@ void QmlInspectorMode::connectionStateChanged() m_watchTableModel->setEngineDebug(m_client); m_expressionWidget->setEngineDebug(m_client); } - + m_objectTreeWidget->clear(); m_propertiesWidget->clear(); m_expressionWidget->clear(); @@ -301,7 +301,7 @@ QWidget *QmlInspectorMode::createMainView() treeWindowLayout->setMargin(0); treeWindowLayout->setSpacing(0); treeWindowLayout->addWidget(treeOptionBar); - treeWindowLayout->addWidget(m_objectTreeWidget); + treeWindowLayout->addWidget(m_objectTreeWidget); Core::MiniSplitter *documentAndTree = new Core::MiniSplitter; documentAndTree->addWidget(editorAndFindWidget); @@ -317,26 +317,26 @@ QWidget *QmlInspectorMode::createMainView() QHBoxLayout *configBarLayout = new QHBoxLayout(configBar); configBarLayout->setMargin(0); configBarLayout->setSpacing(5); - + Core::ICore *core = Core::ICore::instance(); - Core::ActionManager *am = core->actionManager(); + Core::ActionManager *am = core->actionManager(); configBarLayout->addWidget(createToolButton(am->command(ProjectExplorer::Constants::DEBUG)->action())); configBarLayout->addWidget(createToolButton(am->command(ProjectExplorer::Constants::STOP)->action())); configBarLayout->addStretch(); - + QWidget *widgetAboveTabs = new QWidget; QVBoxLayout *widgetAboveTabsLayout = new QVBoxLayout(widgetAboveTabs); widgetAboveTabsLayout->setMargin(0); - widgetAboveTabsLayout->setSpacing(0); + widgetAboveTabsLayout->setSpacing(0); widgetAboveTabsLayout->addWidget(documentAndTree); - widgetAboveTabsLayout->addWidget(configBar); - - Core::MiniSplitter *mainSplitter = new Core::MiniSplitter(Qt::Vertical); + widgetAboveTabsLayout->addWidget(configBar); + + Core::MiniSplitter *mainSplitter = new Core::MiniSplitter(Qt::Vertical); mainSplitter->addWidget(widgetAboveTabs); mainSplitter->addWidget(createBottomWindow()); mainSplitter->setStretchFactor(0, 3); - mainSplitter->setStretchFactor(1, 1); + mainSplitter->setStretchFactor(1, 1); QWidget *centralWidget = new QWidget; QVBoxLayout *centralLayout = new QVBoxLayout(centralWidget); @@ -345,7 +345,7 @@ QWidget *QmlInspectorMode::createMainView() centralLayout->addWidget(mainSplitter); mainWindow->setCentralWidget(centralWidget); - + return mainWindow; } @@ -356,13 +356,13 @@ QWidget *QmlInspectorMode::createBottomWindow() win->setDocumentMode(true); win->setTrackingEnabled(true); - Core::MiniSplitter *leftSplitter = new Core::MiniSplitter(Qt::Vertical); + Core::MiniSplitter *leftSplitter = new Core::MiniSplitter(Qt::Vertical); leftSplitter->addWidget(m_propertiesWidget); leftSplitter->addWidget(m_expressionWidget); leftSplitter->setStretchFactor(0, 2); leftSplitter->setStretchFactor(1, 1); - Core::MiniSplitter *propSplitter = new Core::MiniSplitter(Qt::Horizontal); + Core::MiniSplitter *propSplitter = new Core::MiniSplitter(Qt::Horizontal); propSplitter->addWidget(leftSplitter); propSplitter->addWidget(m_watchTableView); propSplitter->setStretchFactor(0, 2); @@ -411,7 +411,7 @@ void QmlInspectorMode::initWidgets() // FancyMainWindow uses widgets' window titles for tab labels m_objectTreeWidget->setWindowTitle(tr("Object Tree")); m_frameRateWidget->setWindowTitle(tr("Frame rate")); - + m_watchTableView->setModel(m_watchTableModel); WatchTableHeaderView *header = new WatchTableHeaderView(m_watchTableModel); m_watchTableView->setHorizontalHeader(header); @@ -435,7 +435,7 @@ void QmlInspectorMode::initWidgets() m_watchTableView, SLOT(scrollToBottom())); connect(m_watchTableView, SIGNAL(objectActivated(int)), - m_objectTreeWidget, SLOT(setCurrentObject(int))); + m_objectTreeWidget, SLOT(setCurrentObject(int))); connect(m_objectTreeWidget, SIGNAL(currentObjectChanged(QmlDebugObjectReference)), m_expressionWidget, SLOT(setCurrentObject(QmlDebugObjectReference))); @@ -443,7 +443,7 @@ void QmlInspectorMode::initWidgets() m_engineSpinBox = new EngineSpinBox; m_engineSpinBox->setEnabled(false); connect(m_engineSpinBox, SIGNAL(valueChanged(int)), - SLOT(queryEngineContext(int))); + SLOT(queryEngineContext(int))); } void QmlInspectorMode::reloadEngines() @@ -459,8 +459,8 @@ void QmlInspectorMode::reloadEngines() if (!m_engineQuery->isWaiting()) enginesChanged(); else - QObject::connect(m_engineQuery, SIGNAL(stateChanged(QmlDebugQuery::State)), - this, SLOT(enginesChanged())); + QObject::connect(m_engineQuery, SIGNAL(stateChanged(QmlDebugQuery::State)), + this, SLOT(enginesChanged())); } void QmlInspectorMode::enginesChanged() diff --git a/src/plugins/qmlinspector/qmlinspectormode.h b/src/plugins/qmlinspector/qmlinspectormode.h index 764fde4ba3c8108cf4362ba4a95172bd097ee567..9ee90d610453c386288227d0037500dfb9edb0c4 100644 --- a/src/plugins/qmlinspector/qmlinspectormode.h +++ b/src/plugins/qmlinspector/qmlinspectormode.h @@ -53,7 +53,7 @@ class ObjectPropertiesView; class CanvasFrameRate; class ExpressionQueryWidget; class EngineSpinBox; - + class QmlInspectorMode : public Core::BaseMode { @@ -61,13 +61,13 @@ class QmlInspectorMode : public Core::BaseMode public: QmlInspectorMode(QObject *parent = 0); - + signals: void statusMessage(const QString &text); - -public slots: + +public slots: void connectToViewer(); // using host, port from widgets - void disconnectFromViewer(); + void disconnectFromViewer(); private slots: void connectionStateChanged(); @@ -84,13 +84,13 @@ private: void initWidgets(); QWidget *createBottomWindow(); QToolButton *createToolButton(QAction *action); - + QmlDebugConnection *m_conn; QmlEngineDebug *m_client; QmlDebugEnginesQuery *m_engineQuery; QmlDebugRootContextQuery *m_contextQuery; - + ObjectTree *m_objectTreeWidget; ObjectPropertiesView *m_propertiesWidget; WatchTableModel *m_watchTableModel; diff --git a/src/plugins/qmlinspector/qmlinspectorplugin.cpp b/src/plugins/qmlinspector/qmlinspectorplugin.cpp index 2ca3f0c54166fb4985a2d131a6968e5a7f6852df..518a5f45d2c4916f3e96f7d73725c1e17e6ac4aa 100644 --- a/src/plugins/qmlinspector/qmlinspectorplugin.cpp +++ b/src/plugins/qmlinspector/qmlinspectorplugin.cpp @@ -109,7 +109,7 @@ void QmlInspectorPlugin::extensionsInitialized() void QmlInspectorPlugin::currentModeChanged(Core::IMode *mode) { - if (mode == m_inspectMode) + if (mode == m_inspectMode) m_inspectMode->connectToViewer(); } diff --git a/src/plugins/qmljseditor/qmljseditorplugin.cpp b/src/plugins/qmljseditor/qmljseditorplugin.cpp index 81c800d35e2f2bab24783b1fc337a8aeae3d4f1e..60df578b86bc7a5af462bf3b2e8d4ce7f2a0bedd 100644 --- a/src/plugins/qmljseditor/qmljseditorplugin.cpp +++ b/src/plugins/qmljseditor/qmljseditorplugin.cpp @@ -133,7 +133,7 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e m_completion->setCaseSensitivity(caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive); settings->endGroup(); settings->endGroup(); - + error_message->clear(); return true; diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.pri b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.pri index 374fca6aec3d3f726a51c7e3d7224cd8a5005518..2494093aeb7ef1b36b1b796e25580092dacef4e7 100644 --- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.pri +++ b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizard.pri @@ -23,4 +23,4 @@ FORMS += \ $$PWD/classdefinition.ui \ $$PWD/customwidgetwidgetswizardpage.ui \ $$PWD/customwidgetpluginwizardpage.ui - + diff --git a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp index dad219e0867d0df581e0013c51b91f61baa228b8..2207a4a778d5b4a78a2042c4876944d6b9559b1f 100644 --- a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp +++ b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp @@ -178,7 +178,7 @@ void copyRecursive(const QDir& from, const QDir& to, const QString& dir) } foreach(const QString& roDir, src.entryList(QDir::NoDotAndDotDot|QDir::Dirs)) { copyRecursive(src, dest, QDir(roDir).dirName()); - } + } } } // namespace diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosettingspage.h b/src/plugins/qt4projectmanager/qt-maemo/maemosettingspage.h index ca48160a79c1a0a60126c0fcbbef48bee5f851d1..fe89b59f125802d677a94fc1697c07a367bdf5e1 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemosettingspage.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemosettingspage.h @@ -44,7 +44,7 @@ #include <coreplugin/dialogs/ioptionspage.h> -namespace Qt4ProjectManager{ +namespace Qt4ProjectManager{ namespace Internal { class MaemoSettingsWidget; diff --git a/src/plugins/qt4projectmanager/qt-maemo/qt-maemo.pri b/src/plugins/qt4projectmanager/qt-maemo/qt-maemo.pri index 9f79c66b11af48082205479e5d684e5fe214f574..ec1798c027dfd1a91b1fef1ee312041b9a526aa9 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/qt-maemo.pri +++ b/src/plugins/qt4projectmanager/qt-maemo/qt-maemo.pri @@ -1,5 +1,5 @@ SUPPORT_QT_MAEMO = $$(QTCREATOR_WITH_MAEMO) -!isEmpty(SUPPORT_QT_MAEMO) { +!isEmpty(SUPPORT_QT_MAEMO) { message("Adding experimental support for Qt/Maemo applications.") DEFINES += QTCREATOR_WITH_MAEMO DEFINES += USE_SSH_LIB diff --git a/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.h b/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.h index 3ce865890a8793d76ce1ec040b48a1b0b4a092d1..b38e6d1120e891d375c7dd70b7a0bc27dd907141 100644 --- a/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.h +++ b/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.h @@ -53,7 +53,7 @@ public: protected: virtual bool equals(ToolChain *other) const; -private: +private: const S60ToolChainMixin m_mixin; const ProjectExplorer::ToolChain::ToolChainType m_type; const QString m_gcceCommand; diff --git a/src/plugins/qt4projectmanager/qt-s60/qt-s60.pri b/src/plugins/qt4projectmanager/qt-s60/qt-s60.pri index 8f5e2370fc997b67ecd548972099115a26c4f7e6..ca916885a0a312a424da5cc58e175a806afb3753 100644 --- a/src/plugins/qt4projectmanager/qt-s60/qt-s60.pri +++ b/src/plugins/qt4projectmanager/qt-s60/qt-s60.pri @@ -1,4 +1,4 @@ -!isEmpty(SUPPORT_QT_S60) { +!isEmpty(SUPPORT_QT_S60) { message("Adding experimental support for Qt/S60 applications.") DEFINES += QTCREATOR_WITH_S60 } diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp index 075a55d6377e036f7f7cdba3584d81eb7a3b4b1d..233269e43c3e4d7fd80dfcb2ad13a1acdaa70ea5 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp @@ -397,7 +397,7 @@ RunConfiguration *S60DeviceRunConfigurationFactory::create(Project *project, con // ======== S60DeviceRunControlBase S60DeviceRunControlBase::S60DeviceRunControlBase(RunConfiguration *runConfiguration) : - RunControl(runConfiguration), + RunControl(runConfiguration), m_toolChain(ProjectExplorer::ToolChain::INVALID), m_makesis(new QProcess(this)), m_signsis(0), @@ -449,8 +449,8 @@ S60DeviceRunControlBase::S60DeviceRunControlBase(RunConfiguration *runConfigurat m_makesis->setEnvironment(env.toStringList()); } break; - default: - m_toolsDirectory = device.toolsRoot + QLatin1String("/epoc32/tools"); + default: + m_toolsDirectory = device.toolsRoot + QLatin1String("/epoc32/tools"); m_makesisTool = m_toolsDirectory + "/makesis.exe"; // Set up signing packages m_signsis = new QProcess(this); @@ -528,7 +528,7 @@ void S60DeviceRunControlBase::start() } m_makesis->setWorkingDirectory(m_workingDirectory); - emit addToOutputWindow(this, tr("%1 %2").arg(QDir::toNativeSeparators(m_makesisTool), m_packageFile)); + emit addToOutputWindow(this, tr("%1 %2").arg(QDir::toNativeSeparators(m_makesisTool), m_packageFile)); if (debug) qDebug() << m_makesisTool << makeSisArgs << m_workingDirectory; m_makesis->start(m_makesisTool, makeSisArgs, QIODevice::ReadOnly); @@ -685,7 +685,7 @@ void S60DeviceRunControlBase::startDeployment() initLauncher(runFileName, m_launcher); emit addToOutputWindow(this, tr("Package: %1\nDeploying application to '%2'...").arg(lsFile(copySrc), m_serialPortFriendlyName)); QString errorMessage; - // Prompt the user to start up the Blue tooth connection + // Prompt the user to start up the Blue tooth connection const trk::PromptStartCommunicationResult src = S60RunConfigBluetoothStarter::startCommunication(m_launcher->trkDevice(), m_serialPortName, @@ -809,7 +809,7 @@ void S60DeviceRunControlBase::slotWaitingForTrkClosed() { if (m_launcher && m_launcher->state() == trk::Launcher::WaitingForTrk) { stop(); - error(this, tr("Canceled.")); + error(this, tr("Canceled.")); emit finished(); } } diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h index 26b7133862e2909b3b8538349c34c3f38f1c385c..0247672e4c8b3c8b67abc5a29211139b34bf0205 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h +++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h @@ -119,7 +119,7 @@ private: bool m_cachedTargetInformationValid; QString m_serialPortName; int m_communicationType; - SigningMode m_signingMode; + SigningMode m_signingMode; QString m_customSignaturePath; QString m_customKeyPath; QStringList m_commandLineArguments; @@ -190,7 +190,7 @@ private slots: void slotWaitingForTrkClosed(); void reportDeployFinished(); -private: +private: bool createPackageFileFromTemplate(QString *errorMessage); void startSigning(); void startDeployment(); @@ -251,7 +251,7 @@ public: virtual void stop(); -protected: +protected: virtual void initLauncher(const QString &executable, trk::Launcher *); virtual void handleLauncherFinished(); virtual bool checkConfiguration(QString *errorMessage, diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.cpp index e55d0b46aef569b0556fc778e6816fd1636ea1f6..f22f09f9fa69811297572bffe8902e5789d23cbb 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.cpp @@ -98,7 +98,7 @@ S60DeviceRunConfigurationWidget::S60DeviceRunConfigurationWidget( formLayout->addRow(tr("Arguments:"), m_argumentsLineEdit); formLayout->addRow(tr("Install File:"), m_sisxFileLabel); - updateSerialDevices(); + updateSerialDevices(); connect(S60Manager::instance()->serialDeviceLister(), SIGNAL(updated()), this, SLOT(updateSerialDevices())); // Serial devices control @@ -285,7 +285,7 @@ void S60DeviceRunConfigurationWidget::updateSummary() tr("<No Device>"); const QString signature = m_runConfiguration->signingMode() == S60DeviceRunConfiguration::SignCustom ? tr("(custom certificate)") : - tr("(self-signed certificate)"); + tr("(self-signed certificate)"); m_detailsWidget->setSummaryText(tr("Summary: Run on '%1' %2").arg(device, signature)); } @@ -365,7 +365,7 @@ void S60DeviceRunConfigurationWidget::updateDeviceInfo() }; if (!m_infoLauncher->startServer(&message)) { setDeviceInfoLabel(message, true); - m_infoLauncher->deleteLater(); + m_infoLauncher->deleteLater(); return; } // Wait for either timeout or results diff --git a/src/plugins/qt4projectmanager/qt-s60/serialdevicelister.cpp b/src/plugins/qt4projectmanager/qt-s60/serialdevicelister.cpp index 35e2b64254ecc1f84ba7893db96dd90e33d64dff..bcfac48f4a0afe417bec7d37db17273a6d851351 100644 --- a/src/plugins/qt4projectmanager/qt-s60/serialdevicelister.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/serialdevicelister.cpp @@ -124,7 +124,7 @@ QList<CommunicationDevice> SerialDeviceLister::blueToothDevices() const const QString friendlyFormat = QLatin1String("Bluetooth device (%1)"); for (int d = 0; d < 4; d++) { CommunicationDevice device(BlueToothCommunication, prefix + QString::number(d)); - if (d == 0 || QFileInfo(device.portName).exists()) { + if (d == 0 || QFileInfo(device.portName).exists()) { device.friendlyName = friendlyFormat.arg(device.portName); rc.push_back(device); } diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp index ef158839f797d964262349290ab8fe87babeb140..7b6eadfb42d50a366b501d99785b8a95aba18f27 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.cpp +++ b/src/plugins/qt4projectmanager/qt4nodes.cpp @@ -1260,7 +1260,7 @@ void Qt4ProFileNode::createUiCodeModelSupport() const QString uiDir = uiDirectory(); foreach (const FileNode *uiFile, uiFiles) { const QString uiHeaderFilePath = uiHeaderFile(uiDir, uiFile->path()); -// qDebug()<<"code model support for "<<uiFile->path()<<" "<<uiHeaderFilePath; +// qDebug()<<"code model support for "<<uiFile->path()<<" "<<uiHeaderFilePath; QMap<QString, Qt4UiCodeModelSupport *>::iterator it = oldCodeModelSupport.find(uiFile->path()); if (it != oldCodeModelSupport.end()) { // qDebug()<<"updated old codemodelsupport"; diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp index ae9fd5fa606867cd5a5b86c557cdcb9810c47584..3e05260990e5ae17ae4038410fc18cb520b6b20a 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp +++ b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp @@ -92,7 +92,7 @@ Qt4ProjectManagerPlugin::~Qt4ProjectManagerPlugin() bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *errorMessage) { Q_UNUSED(arguments) - + Core::ICore *core = Core::ICore::instance(); if (!core->mimeDatabase()->addMimeTypes(QLatin1String(":qt4projectmanager/Qt4ProjectManager.mimetypes.xml"), errorMessage)) return false; diff --git a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp index c919531ccd961689eb15232b86187b80e6ab7a6a..cc2086389d7eeb0cc61e4a4b3ea2150eebbdecf1 100644 --- a/src/plugins/qt4projectmanager/qt4runconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt4runconfiguration.cpp @@ -418,7 +418,7 @@ void Qt4RunConfiguration::save(PersistentSettingsWriter &writer) const } void Qt4RunConfiguration::restore(const PersistentSettingsReader &reader) -{ +{ LocalApplicationRunConfiguration::restore(reader); const QDir projectDir = QFileInfo(project()->file()->fileName()).absoluteDir(); m_commandLineArguments = reader.restoreValue("CommandLineArguments").toStringList(); diff --git a/src/plugins/qt4projectmanager/qtoptionspage.cpp b/src/plugins/qt4projectmanager/qtoptionspage.cpp index 70dbffc90669e29fb2b6a15bd12fa8fecbc1d6d1..aae26a0cce8e96e829a6f757b4152485c1134d5c 100644 --- a/src/plugins/qt4projectmanager/qtoptionspage.cpp +++ b/src/plugins/qt4projectmanager/qtoptionspage.cpp @@ -241,7 +241,7 @@ bool QtOptionsPageWidget::eventFilter(QObject *o, QEvent *e) // Set the items tooltip, which may cause costly initialization // of QtVersion and must be up-to-date if (o != m_ui->qtdirList || e->type() != QEvent::ToolTip) - return false; + return false; QHelpEvent *helpEvent = static_cast<QHelpEvent *>(e); const QPoint treePos = helpEvent->pos() - QPoint(0, m_ui->qtdirList->header()->height()); QTreeWidgetItem *item = m_ui->qtdirList->itemAt(treePos); diff --git a/src/plugins/qt4projectmanager/wizards/filespage.h b/src/plugins/qt4projectmanager/wizards/filespage.h index a12aa88e3ccad727956074372c421c9485a5fef9..93d14a3713a8664f0f9e73f65d20f45c298fe673 100644 --- a/src/plugins/qt4projectmanager/wizards/filespage.h +++ b/src/plugins/qt4projectmanager/wizards/filespage.h @@ -66,7 +66,7 @@ public: bool formInputCheckable() const; bool formInputChecked() const; QStringList baseClassChoices() const; - bool lowerCaseFiles() const; + bool lowerCaseFiles() const; bool isClassTypeComboVisible() const; void setSuffixes(const QString &header, const QString &source, const QString &form = QString()); diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp index c6359576c4d2870148c014b400f1666da7727c02..3b72ed5dc5204e6aba1b97e57db36abb3bc3ad31 100644 --- a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp @@ -94,7 +94,7 @@ QWizard *GuiAppWizard::createWizardDialog(QWidget *parent, // Order! suffixes first to generate files correctly dialog->setLowerCaseFiles(QtWizard::lowerCaseFiles()); dialog->setSuffixes(headerSuffix(), sourceSuffix(), formSuffix()); - dialog->setBaseClasses(baseClasses()); + dialog->setBaseClasses(baseClasses()); return dialog; } @@ -157,7 +157,7 @@ Core::GeneratedFiles GuiAppWizard::generateFiles(const QWizard *w, form = QSharedPointer<Core::GeneratedFile>(new Core::GeneratedFile(formName)); if (!parametrizeTemplate(templatePath, QLatin1String("widget.ui"), params, &contents, errorMessage)) return Core::GeneratedFiles(); - form->setContents(contents); + form->setContents(contents); if (!generateFormClass(params, *form, &formSource, &formHeader, errorMessage)) return Core::GeneratedFiles(); } else { diff --git a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp index e309e96c560ef536517fb144b255ba7d7fc7cd6f..8d497b84e07a536ebe89cc0170b82b61879aac7e 100644 --- a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp @@ -67,7 +67,7 @@ QWizard *LibraryWizard::createWizardDialog(QWidget *parent, dialog->setLowerCaseFiles(QtWizard::lowerCaseFiles()); dialog->setPath(defaultPath); dialog->setProjectName(LibraryWizardDialog::uniqueProjectName(defaultPath)); - dialog->setSuffixes(headerSuffix(), sourceSuffix(), formSuffix()); + dialog->setSuffixes(headerSuffix(), sourceSuffix(), formSuffix()); return dialog; } diff --git a/src/plugins/qt4projectmanager/wizards/qtwizard.cpp b/src/plugins/qt4projectmanager/wizards/qtwizard.cpp index cc5c08b92d4f739502df0f15cd8bd245d6052e83..9a2b39aaa584c67f622db3fdd5ec9d79a45b1e48 100644 --- a/src/plugins/qt4projectmanager/wizards/qtwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/qtwizard.cpp @@ -182,7 +182,7 @@ QString BaseQt4ProjectWizardDialog::selectedModules() const } void BaseQt4ProjectWizardDialog::setSelectedModules(const QString &modules, bool lock) -{ +{ if (m_modulesPage) { foreach(const QString &module, modules.split(QLatin1Char(' '))) { m_modulesPage->setModuleSelected(module, true); diff --git a/src/plugins/snippets/snippets.pro b/src/plugins/snippets/snippets.pro index 99d391e73f55caec4a4b4a29476deb9d82e40dd5..8c6eb285cdb7771bc1e76262f704a9ea795afc9a 100644 --- a/src/plugins/snippets/snippets.pro +++ b/src/plugins/snippets/snippets.pro @@ -13,12 +13,12 @@ HEADERS += snippetsplugin.h \ snippetswindow.h \ snippetspec.h \ snippetscompletion.h \ - inputwidget.h + inputwidget.h SOURCES += snippetsplugin.cpp \ snippetswindow.cpp \ snippetspec.cpp \ snippetscompletion.cpp \ - inputwidget.cpp + inputwidget.cpp RESOURCES += snippets.qrc diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp index 2cab3832665fa3edee676fb68bb2953a9ad17021..f754d076bc3ef7254eb872e5c0013f7c98ef69c1 100644 --- a/src/plugins/subversion/subversionplugin.cpp +++ b/src/plugins/subversion/subversionplugin.cpp @@ -812,7 +812,7 @@ void SubversionPlugin::annotate(const QString &workingDir, const QString &file, if (Core::IEditor *editor = locateEditor("annotateFileName", id)) { editor->createNew(response.stdOut); VCSBase::VCSBaseEditor::gotoLineOfEditor(editor, lineNumber); - Core::EditorManager::instance()->activateEditor(editor); + Core::EditorManager::instance()->activateEditor(editor); } else { const QString title = QString::fromLatin1("svn annotate %1").arg(id); Core::IEditor *newEditor = showOutputInEditor(title, response.stdOut, VCSBase::AnnotateOutput, source, codec); diff --git a/src/plugins/texteditor/basefilefind.cpp b/src/plugins/texteditor/basefilefind.cpp index 5c857ce4a4455d10448956acb5f7f09940ae761f..701ea748d858eede651131ac7f17965be4b79da7 100644 --- a/src/plugins/texteditor/basefilefind.cpp +++ b/src/plugins/texteditor/basefilefind.cpp @@ -99,7 +99,7 @@ void BaseFileFind::findAll(const QString &txt, QTextDocument::FindFlags findFlag m_watcher.setFuture(Utils::findInFilesRegExp(txt, files(), findFlags, ITextEditor::openedTextEditorsContents())); else m_watcher.setFuture(Utils::findInFiles(txt, files(), findFlags, ITextEditor::openedTextEditorsContents())); - Core::FutureProgress *progress = + Core::FutureProgress *progress = Core::ICore::instance()->progressManager()->addTask(m_watcher.future(), "Search", Constants::TASK_SEARCH); diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index d54ee3f6e21bf58cccb06d85207c956eeba96c80..b356a5e4f45b0a5438c2da11b7ae78bbe0f3f960 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -2756,7 +2756,7 @@ void BaseTextEditor::paintEvent(QPaintEvent *e) if (d->m_snippetOverlay && d->m_snippetOverlay->isVisible()) d->m_snippetOverlay->paint(&painter, e->rect()); - + if (!d->m_searchResultOverlay->isEmpty()) { d->m_searchResultOverlay->paint(&painter, e->rect()); d->m_searchResultOverlay->clear(); diff --git a/src/plugins/vcsbase/checkoutprogresswizardpage.cpp b/src/plugins/vcsbase/checkoutprogresswizardpage.cpp index 8fcaef51fc3db364744a548cf7a8548553e0f11b..c0b5c8bd9ae57d428c8ddd69c35cb52dc6f3085e 100644 --- a/src/plugins/vcsbase/checkoutprogresswizardpage.cpp +++ b/src/plugins/vcsbase/checkoutprogresswizardpage.cpp @@ -63,7 +63,7 @@ void CheckoutProgressWizardPage::start(const QSharedPointer<AbstractCheckoutJob> connect(job.data(), SIGNAL(succeeded()), this, SLOT(slotSucceeded())); QApplication::setOverrideCursor(Qt::WaitCursor); ui->logPlainTextEdit->clear(); - setSubTitle(tr("Checkout started...")); + setSubTitle(tr("Checkout started...")); m_state = Running; // Note: Process jobs can emit failed() right from // the start() method on Windows. @@ -84,7 +84,7 @@ void CheckoutProgressWizardPage::slotFailed(const QString &why) void CheckoutProgressWizardPage::slotSucceeded() { if (m_state == Running) { - m_state = Succeeded; + m_state = Succeeded; QApplication::restoreOverrideCursor(); setSubTitle(tr("Succeeded.")); emit completeChanged(); diff --git a/src/plugins/vcsbase/nicknamedialog.cpp b/src/plugins/vcsbase/nicknamedialog.cpp index 3fe721c2b694d5ec1c221a9d9981c12138a498ca..e41eeec8326afce45673e2b27e32293c7e25ee25 100644 --- a/src/plugins/vcsbase/nicknamedialog.cpp +++ b/src/plugins/vcsbase/nicknamedialog.cpp @@ -118,7 +118,7 @@ QString NickNameEntry::nickName() const QList<QStandardItem *> NickNameEntry::toModelRow() const { - const QVariant nickNameData = nickName(); + const QVariant nickNameData = nickName(); const Qt::ItemFlags flags = Qt::ItemIsSelectable|Qt::ItemIsEnabled; QStandardItem *i1 = new QStandardItem(name); i1->setFlags(flags); diff --git a/src/plugins/vcsbase/vcsbaseeditor.cpp b/src/plugins/vcsbase/vcsbaseeditor.cpp index 1b62c2a17b5e610c0363e43a2a419190bf4ed541..76008d42ca7b13759ae8416fb3f58f48c51eff14 100644 --- a/src/plugins/vcsbase/vcsbaseeditor.cpp +++ b/src/plugins/vcsbase/vcsbaseeditor.cpp @@ -332,11 +332,11 @@ void VCSBaseEditor::slotPopulateDiffBrowser() } } -void VCSBaseEditor::slotDiffBrowse(int index) +void VCSBaseEditor::slotDiffBrowse(int index) { // goto diffed file as indicated by index/line number if (index < 0 || index >= d->m_diffSections.size()) - return; + return; const int lineNumber = d->m_diffSections.at(index); Core::EditorManager *editorManager = Core::EditorManager::instance(); editorManager->addCurrentPositionToNavigationHistory(); @@ -362,7 +362,7 @@ void VCSBaseEditor::slotDiffCursorPositionChanged() // Adapt diff file browse combo to new position // if the cursor goes across a file line. QTC_ASSERT(d->m_parameters->type == DiffOutput, return) - const int newCursorLine = textCursor().blockNumber(); + const int newCursorLine = textCursor().blockNumber(); if (newCursorLine == d->m_cursorLine) return; // Which section does it belong to? diff --git a/src/plugins/vcsbase/vcsbaseplugin.h b/src/plugins/vcsbase/vcsbaseplugin.h index 4f4a6393dff87e668f1d6c85f436c2bab2c30634..d4d7ebabd8e424ca1f5188fbe1b99ed25376f379 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.h +++ b/src/plugins/vcsbase/vcsbaseplugin.h @@ -45,7 +45,7 @@ namespace Core { class IVersionControl; } -namespace VCSBase { +namespace VCSBase { namespace Internal { struct State; } @@ -144,7 +144,7 @@ protected: void initialize(Core::IVersionControl *vc); -public: +public: virtual ~VCSBasePlugin(); const VCSBasePluginState ¤tState() const; @@ -166,7 +166,7 @@ protected: // Implement to enable the plugin menu actions according to state. virtual void updateActions(ActionState as) = 0; - // Implement to start the submit process. + // Implement to start the submit process. virtual bool submitEditorAboutToClose(VCSBaseSubmitEditor *submitEditor) = 0; // A helper to enable the VCS menu action according to state: diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp index f38a0a231af80a80a8779f24b67bdd89b696d1a0..8632873c8ec2611222e805502cecdbcc47138cac 100644 --- a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp +++ b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp @@ -591,7 +591,7 @@ bool VCSBaseSubmitEditor::runSubmitMessageCheckScript(const QString &checkScript const QString stdOut = QString::fromLocal8Bit(checkProcess.readAllStandardOutput()); if (!stdOut.isEmpty()) outputWindow->appendSilently(stdOut); - const QString stdErr = QString::fromLocal8Bit(checkProcess.readAllStandardError()); + const QString stdErr = QString::fromLocal8Bit(checkProcess.readAllStandardError()); if (!stdErr.isEmpty()) outputWindow->appendSilently(stdErr); const int exitCode = checkProcess.exitCode(); diff --git a/src/rpath.pri b/src/rpath.pri index e11b171c8e4779c8472602a1b2ec8ae71e918c56..750d0ed4d8da5f651c99b693bf2136fab27bc34b 100644 --- a/src/rpath.pri +++ b/src/rpath.pri @@ -5,7 +5,7 @@ macx { # this expands to $ORIGIN (after qmake and make), it does NOT read a qmake var QMAKE_RPATHDIR += \$\$ORIGIN/../$$IDE_LIBRARY_BASENAME/qtcreator IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":") - + QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\' QMAKE_RPATHDIR = } diff --git a/src/shared/cpaster/cgi.cpp b/src/shared/cpaster/cgi.cpp index a6c37904ff1ff43506800cc32a9f790ff16efc2a..91ef6b7281c4c56ae0af615a940585c120429091 100644 --- a/src/shared/cpaster/cgi.cpp +++ b/src/shared/cpaster/cgi.cpp @@ -39,7 +39,7 @@ QString CGI::encodeURL(const QString &rawText) QByteArray utf = rawText.toUtf8(); QString enc; enc.reserve(utf.length()); // Make sure we at least have space for a normal US-ASCII URL - + QByteArray::const_iterator it = utf.constBegin(); while (it != utf.constEnd()) { char ch = *it; diff --git a/src/shared/cpaster/splitter.cpp b/src/shared/cpaster/splitter.cpp index e08411d52c02772325e9eff39a535fc9a49c50df..34e13ca0e102aba496d07bb75335584a5d460d08 100644 --- a/src/shared/cpaster/splitter.cpp +++ b/src/shared/cpaster/splitter.cpp @@ -62,7 +62,7 @@ FileDataList splitDiffToFiles(const QByteArray &data) // The algorithm works like this: // On the first match we only get the filename of the first patch part // On the second match (if any) we get the diff content, and the name of the next file patch - + while (-1 != (splitIndex = splitExpr.indexIn(strData,splitIndex))) { if (!filename.isEmpty()) { QString content = strData.mid(previousSplit, splitIndex - previousSplit); diff --git a/src/shared/cplusplus/AST.cpp b/src/shared/cplusplus/AST.cpp index d394fa369410efd52373224a25cb38708f917c1d..5252c2d051c2f11e304ff069621236acdac5b00f 100644 --- a/src/shared/cplusplus/AST.cpp +++ b/src/shared/cplusplus/AST.cpp @@ -2157,7 +2157,7 @@ unsigned ObjCPropertyDeclarationAST::lastToken() const return property_attribute_list->lastToken(); else if (lparen_token) return lparen_token + 1; - + return property_token + 1; } diff --git a/src/shared/cplusplus/CPlusPlusForwardDeclarations.h b/src/shared/cplusplus/CPlusPlusForwardDeclarations.h index caa90a552349a0e81e48910a30fdc70791dace5b..f60036229432c0d98afc9acaf7d212e2cef8e472 100644 --- a/src/shared/cplusplus/CPlusPlusForwardDeclarations.h +++ b/src/shared/cplusplus/CPlusPlusForwardDeclarations.h @@ -61,7 +61,7 @@ # define CPLUSPLUS_EXPORT # else # ifdef ICHECK_BUILD -# define CPLUSPLUS_EXPORT +# define CPLUSPLUS_EXPORT # else # define CPLUSPLUS_EXPORT Q_DECL_IMPORT # endif diff --git a/src/shared/cplusplus/CheckStatement.cpp b/src/shared/cplusplus/CheckStatement.cpp index 878d3fbbeb36a553fb911cc534c0e6cf8ab598e8..41ccdf1c27a769ec5a4b05ef0ff2b6d671ac1b31 100644 --- a/src/shared/cplusplus/CheckStatement.cpp +++ b/src/shared/cplusplus/CheckStatement.cpp @@ -341,7 +341,7 @@ bool CheckStatement::visit(QtMemberDeclarationAST *ast) std::string privateClass; privateClass += nameId->identifier()->chars(); privateClass += "Private"; - + const Name *privName = control()->nameId(control()->findOrInsertIdentifier(privateClass.c_str(), privateClass.size())); declTy.setType(control()->namedType(privName)); diff --git a/src/shared/cplusplus/Parser.cpp b/src/shared/cplusplus/Parser.cpp index 5e1fc5a8ecfaea37559d2f192a76493d29430881..7cb2c8ae860e78c4e3d58d3a8586dc41dd6445c1 100644 --- a/src/shared/cplusplus/Parser.cpp +++ b/src/shared/cplusplus/Parser.cpp @@ -279,7 +279,7 @@ void Parser::skipUntilDeclaration() lookAtFunctionSpecifier() || lookAtStorageClassSpecifier()) return; } // switch - } + } } bool Parser::skipUntilStatement() @@ -2490,7 +2490,7 @@ bool Parser::maybeAmbiguousStatement(DeclarationStatementAST *ast) const if (declarator->postfix_declarator_list && declarator->postfix_declarator_list->value->asFunctionDeclarator() && ! declarator->initializer) { return false; - } + } } return true; diff --git a/src/shared/cplusplus/Semantic.h b/src/shared/cplusplus/Semantic.h index 6ca0b81c70b610e7852344b08c6bb096da09c634..98c6450520325d0000bb216e57d6462d1d6e164c 100644 --- a/src/shared/cplusplus/Semantic.h +++ b/src/shared/cplusplus/Semantic.h @@ -64,7 +64,7 @@ public: Semantic(TranslationUnit *translationUnit); virtual ~Semantic(); - TranslationUnit *translationUnit() const; + TranslationUnit *translationUnit() const; Control *control() const; FullySpecifiedType check(SpecifierListAST *specifier, Scope *scope); diff --git a/src/shared/cplusplus/Token.cpp b/src/shared/cplusplus/Token.cpp index 61c22b7cb257499d6ffa3533daa125dfa8189119..a0d1e38d784acb45fd52f73b83cc216ae513a928 100644 --- a/src/shared/cplusplus/Token.cpp +++ b/src/shared/cplusplus/Token.cpp @@ -91,7 +91,7 @@ static const char *token_names[] = { ("@protected"), ("@protocol"), ("@public"), ("@required"), ("@selector"), ("@synchronized"), ("@synthesize"), ("@throw"), ("@try"), - ("SIGNAL"), ("SLOT"), ("Q_SIGNAL"), ("Q_SLOT"), ("signals"), ("slots"), + ("SIGNAL"), ("SLOT"), ("Q_SIGNAL"), ("Q_SLOT"), ("signals"), ("slots"), ("Q_FOREACH"), ("Q_D"), ("Q_Q"), #ifdef ICHECK_BUILD ("Q_INVOKABLE"), ("Q_PROPERTY"), ("Q_ENUMS"), ("Q_FLAGS"), ("Q_DECLARE_FLAGS") diff --git a/src/shared/designerintegrationv2/formresizer.h b/src/shared/designerintegrationv2/formresizer.h index fc46e18e655ae9a78be95873e1f7f2bc186654e6..fb283f2a7f903a7bd5ff54906aecaedcd1464394 100644 --- a/src/shared/designerintegrationv2/formresizer.h +++ b/src/shared/designerintegrationv2/formresizer.h @@ -52,7 +52,7 @@ class SizeHandleRect; * | | * | | * Handles QVBoxLayout [margin: SELECTION_MARGIN] - * | + * | * Frame [margin: lineWidth] * | * QVBoxLayout diff --git a/src/shared/help/bookmarkmanager.cpp b/src/shared/help/bookmarkmanager.cpp index 4a088bee51f29c3dd98cd284d66e733ca8253f98..e804ffbb2cecd20c9158917e6504ea088e6c2608 100644 --- a/src/shared/help/bookmarkmanager.cpp +++ b/src/shared/help/bookmarkmanager.cpp @@ -610,7 +610,7 @@ BookmarkManager::BookmarkManager(QHelpEngineCore* _helpEngine) { bookmarkIcon = QIcon(QLatin1String(":/help/images/bookmark.png")); folderIcon = QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon); - + connect(treeModel, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(itemChanged(QStandardItem*))); } @@ -719,7 +719,7 @@ void BookmarkManager::addNewBookmark(const QModelIndex& index, item->setIcon(bookmarkIcon); item->setData(false, Qt::UserRole + 11); item->setData(url, Qt::UserRole + 10); - + if (index.isValid()) treeModel->itemFromIndex(index)->appendRow(item); else diff --git a/src/shared/help/bookmarkmanager.h b/src/shared/help/bookmarkmanager.h index e0fba25ae20d91b3f5b0cf305c1c0e362234f703..76ae6256f284e89cd2ab78371384ad07c4ccf26e 100644 --- a/src/shared/help/bookmarkmanager.h +++ b/src/shared/help/bookmarkmanager.h @@ -64,7 +64,7 @@ class BookmarkDialog : public QDialog Q_OBJECT public: - BookmarkDialog(BookmarkManager *manager, const QString &title, + BookmarkDialog(BookmarkManager *manager, const QString &title, const QString &url, QWidget *parent = 0); ~BookmarkDialog(); @@ -77,7 +77,7 @@ private slots: void selectBookmarkFolder(const QString &folderName); void customContextMenuRequested(const QPoint &point); void currentChanged(const QModelIndex& current); - + private: bool eventFilter(QObject *object, QEvent *e); @@ -175,7 +175,7 @@ public: private slots: void itemChanged(QStandardItem *item); -private: +private: QString uniqueFolderName() const; void removeBookmarkFolderItems(QStandardItem *item); void readBookmarksRecursive(const QStandardItem *item, QDataStream &stream, diff --git a/src/shared/help/indexwindow.cpp b/src/shared/help/indexwindow.cpp index c1eea45e549e402530b11a07bdfdcf106563960f..10ca5e7aae5830adce6c2cef91a4814ae13e30aa 100644 --- a/src/shared/help/indexwindow.cpp +++ b/src/shared/help/indexwindow.cpp @@ -183,7 +183,7 @@ void IndexWindow::open(QHelpIndexWidget* indexWidget, const QModelIndex &index) QUrl url; if (links.count() > 1) { TopicChooser tc(this, keyword, links); - if (tc.exec() == QDialog::Accepted) + if (tc.exec() == QDialog::Accepted) url = tc.link(); } else if (links.count() == 1) { url = links.constBegin().value(); diff --git a/src/shared/help/topicchooser.cpp b/src/shared/help/topicchooser.cpp index dea020f615d0025c7a6752ff07fa88a03671ecc5..f2db5acd0d9cbcdf8c5596e3aa26da9afca59419 100644 --- a/src/shared/help/topicchooser.cpp +++ b/src/shared/help/topicchooser.cpp @@ -45,7 +45,7 @@ TopicChooser::TopicChooser(QWidget *parent, const QString &keyword, QMap<QString, QUrl>::const_iterator it = m_links.constBegin(); for (; it != m_links.constEnd(); ++it) ui.listWidget->addItem(it.key()); - + if (ui.listWidget->count() != 0) ui.listWidget->setCurrentRow(0); ui.listWidget->setFocus(); diff --git a/src/shared/help/topicchooser.h b/src/shared/help/topicchooser.h index c75945425f82937433b5e1b579ca13637dd4b9e6..9258fe48ee7ab42b03a978d4f4bc9ad8168b7f3f 100644 --- a/src/shared/help/topicchooser.h +++ b/src/shared/help/topicchooser.h @@ -48,8 +48,8 @@ public: TopicChooser(QWidget *parent, const QString &keyword, const QMap<QString, QUrl> &links); - QUrl link() const; - + QUrl link() const; + private: Ui::TopicChooser ui; QMap<QString, QUrl> m_links; diff --git a/src/shared/qrceditor/resourcefile_p.h b/src/shared/qrceditor/resourcefile_p.h index 3d02d596cbea7978410a14bd1d5e236c2816005f..cb4bc2a36815738fe35af61fb5170bf1d9e2f3b0 100644 --- a/src/shared/qrceditor/resourcefile_p.h +++ b/src/shared/qrceditor/resourcefile_p.h @@ -145,7 +145,7 @@ public: void removePrefix(int prefix_idx); void removeFile(int prefix_idx, int file_idx); - + void replacePrefix(int prefix_idx, const QString &prefix); void replaceLang(int prefix_idx, const QString &lang); void replaceAlias(int prefix_idx, int file_idx, const QString &alias); diff --git a/src/shared/qrceditor/resourceview.h b/src/shared/qrceditor/resourceview.h index a7d75748d5e57c9fdb6fbb99dce0b3842f513b29..503249837b036c399ae77c000c3574562e3fc402 100644 --- a/src/shared/qrceditor/resourceview.h +++ b/src/shared/qrceditor/resourceview.h @@ -94,7 +94,7 @@ public: bool isDirty() const; void setDirty(bool dirty); - void enableContextMenu(bool enable); + void enableContextMenu(bool enable); void addFiles(QStringList fileList, const QModelIndex &index); diff --git a/src/shared/qtlockedfile/qtlockedfile.h b/src/shared/qtlockedfile/qtlockedfile.h index ebf72171829d91db18547697aa1c3996fd8f7f0d..3ee58a8076f3f2c7c287d2af6331f4594720a1fa 100644 --- a/src/shared/qtlockedfile/qtlockedfile.h +++ b/src/shared/qtlockedfile/qtlockedfile.h @@ -52,18 +52,18 @@ namespace SharedTools { class QT_QTLOCKEDFILE_EXPORT QtLockedFile : public QFile { -public: +public: enum LockMode { NoLock = 0, ReadLock, WriteLock }; QtLockedFile(); QtLockedFile(const QString &name); ~QtLockedFile(); - + bool lock(LockMode mode, bool block = true); bool unlock(); bool isLocked() const; LockMode lockMode() const; - + private: #ifdef Q_OS_WIN Qt::HANDLE m_semaphore_hnd; diff --git a/src/shared/qtlockedfile/qtlockedfile_unix.cpp b/src/shared/qtlockedfile/qtlockedfile_unix.cpp index b83129e37028ca4705e7b5014201e8d4010742c1..32930ef0033fb1711307e67a5af902871698b7ae 100644 --- a/src/shared/qtlockedfile/qtlockedfile_unix.cpp +++ b/src/shared/qtlockedfile/qtlockedfile_unix.cpp @@ -42,10 +42,10 @@ bool QtLockedFile::lock(LockMode mode, bool block) qWarning("QtLockedFile::lock(): file is not opened"); return false; } - + if (mode == NoLock) return unlock(); - + if (mode == m_lock_mode) return true; @@ -59,14 +59,14 @@ bool QtLockedFile::lock(LockMode mode, bool block) fl.l_type = (mode == ReadLock) ? F_RDLCK : F_WRLCK; int cmd = block ? F_SETLKW : F_SETLK; int ret = fcntl(handle(), cmd, &fl); - + if (ret == -1) { if (errno != EINTR && errno != EAGAIN) qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno)); return false; } - + m_lock_mode = mode; return true; } @@ -88,12 +88,12 @@ bool QtLockedFile::unlock() fl.l_len = 0; fl.l_type = F_UNLCK; int ret = fcntl(handle(), F_SETLKW, &fl); - + if (ret == -1) { qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno)); return false; } - + m_lock_mode = NoLock; return true; } diff --git a/src/shared/trk/bluetoothlistener.cpp b/src/shared/trk/bluetoothlistener.cpp index 1f5ccbe51b43474c605a62bde85a86b5d870c58e..08392320be19041e7958546aba247907c88a5537 100644 --- a/src/shared/trk/bluetoothlistener.cpp +++ b/src/shared/trk/bluetoothlistener.cpp @@ -172,7 +172,7 @@ bool BluetoothListener::start(const QString &device, QString *errorMessage) return true; } -void BluetoothListener::slotStdOutput() +void BluetoothListener::slotStdOutput() { emitMessage(QString::fromLocal8Bit(d->process.readAllStandardOutput())); } diff --git a/src/shared/trk/bluetoothlistener_gui.cpp b/src/shared/trk/bluetoothlistener_gui.cpp index 9b6dbd3bc6e77f1c202bcade5fb3b3fbc5902e6b..7463a0306077c08190992033946f6e980dc633a6 100644 --- a/src/shared/trk/bluetoothlistener_gui.cpp +++ b/src/shared/trk/bluetoothlistener_gui.cpp @@ -61,7 +61,7 @@ PromptStartCommunicationResult QMessageBox messageBox(QMessageBox::Information, msgBoxTitle, msgBoxText, QMessageBox::Cancel, msgBoxParent); QObject::connect(&starter, SIGNAL(connected()), &messageBox, SLOT(close())); QObject::connect(&starter, SIGNAL(timeout()), &messageBox, SLOT(close())); - messageBox.exec(); + messageBox.exec(); // Only starter.state() is reliable here to obtain the state. switch (starter.state()) { case AbstractBluetoothStarter::Running: diff --git a/src/shared/trk/launcher.cpp b/src/shared/trk/launcher.cpp index 5926410b7720b7c8a58c258fc0240e215e1cc37d..fc2f05ad7e8572a6f14694f9525ec75eb907ace6 100644 --- a/src/shared/trk/launcher.cpp +++ b/src/shared/trk/launcher.cpp @@ -88,7 +88,7 @@ Launcher::Launcher(Actions startupActions, d(new LauncherPrivate(dev)) { d->m_startupActions = startupActions; - connect(d->m_device.data(), SIGNAL(messageReceived(trk::TrkResult)), this, SLOT(handleResult(trk::TrkResult))); + connect(d->m_device.data(), SIGNAL(messageReceived(trk::TrkResult)), this, SLOT(handleResult(trk::TrkResult))); connect(this, SIGNAL(finished()), d->m_device.data(), SLOT(close())); } diff --git a/src/shared/trk/launcher.h b/src/shared/trk/launcher.h index 01ce6f66065d18dee7e8cd7c73b3124f1d08d16b..9cd4b968e738c8d5aaf3d57e07464dc1f824f2e8 100644 --- a/src/shared/trk/launcher.h +++ b/src/shared/trk/launcher.h @@ -84,7 +84,7 @@ public: void setInstallFileName(const QString &name); void setCommandLineArgs(const QStringList &args); bool startServer(QString *errorMessage); - void setVerbose(int v); + void setVerbose(int v); void setSerialFrame(bool b); bool serialFrame() const; // Close device or leave it open diff --git a/src/shared/trk/trkdevice.cpp b/src/shared/trk/trkdevice.cpp index 0da1a79d027db5668c22a9a6c26142c6b57aff4a..8290a56097959a2bf99753672967b533bd617a35 100644 --- a/src/shared/trk/trkdevice.cpp +++ b/src/shared/trk/trkdevice.cpp @@ -142,7 +142,7 @@ namespace trk { /////////////////////////////////////////////////////////////////////// class TrkWriteQueue -{ +{ Q_DISABLE_COPY(TrkWriteQueue) public: explicit TrkWriteQueue(); @@ -336,7 +336,7 @@ class WriterThread : public QThread { Q_OBJECT Q_DISABLE_COPY(WriterThread) -public: +public: explicit WriterThread(const QSharedPointer<DeviceContext> &context); // Enqueue messages. @@ -361,7 +361,7 @@ public slots: private slots: void invokeNoopMessage(const trk::TrkMessage &); -private: +private: bool write(const QByteArray &data, QString *errorMessage); inline int writePendingMessage(); @@ -679,7 +679,7 @@ int WinReaderThread::tryRead() if (!ClearCommError(m_context->device, NULL, &comStat)){ emit error(QString::fromLatin1("ClearCommError failed: %1").arg(winErrorMessage(GetLastError()))); return -7; - } + } const DWORD bytesToRead = qMax(DWORD(1), qMin(comStat.cbInQue, DWORD(BufSize))); // Trigger read DWORD bytesRead = 0; @@ -695,7 +695,7 @@ int WinReaderThread::tryRead() if (readError != ERROR_IO_PENDING) { emit error(QString::fromLatin1("Read error: %1").arg(winErrorMessage(readError))); return -1; - } + } // Wait for either termination or data const DWORD wr = WaitForMultipleObjects(HandleCount, m_handles, false, INFINITE); if (wr == WAIT_FAILED) { @@ -770,7 +770,7 @@ private: int m_terminatePipeFileDescriptors[2]; }; -UnixReaderThread::UnixReaderThread(const QSharedPointer<DeviceContext> &context) : +UnixReaderThread::UnixReaderThread(const QSharedPointer<DeviceContext> &context) : ReaderThreadBase(context) { m_terminatePipeFileDescriptors[0] = m_terminatePipeFileDescriptors[1] = -1; @@ -965,8 +965,8 @@ bool TrkDevice::open(const QString &port, QString *errorMessage) d->writerThread = QSharedPointer<WriterThread>(new WriterThread(d->deviceContext)); connect(d->writerThread.data(), SIGNAL(error(QString)), this, SLOT(emitError(QString)), - Qt::QueuedConnection); - d->writerThread->start(); + Qt::QueuedConnection); + d->writerThread->start(); if (d->verbose) qDebug() << "Opened" << port; @@ -1033,7 +1033,7 @@ void TrkDevice::slotMessageReceived(const trk::TrkResult &result, const QByteArr d->writerThread->slotHandleResult(result); if (d->verbose > 1) qDebug() << "Received: " << result.toString(); - emit messageReceived(result); + emit messageReceived(result); if (!rawData.isEmpty()) emit rawDataReceived(rawData); } diff --git a/src/shared/trk/trkdevice.h b/src/shared/trk/trkdevice.h index 632dea1b24b32c32291be86052bf457c919e0518..fd6a961b08752a32a52f440cd67bd73e907cbdd7 100644 --- a/src/shared/trk/trkdevice.h +++ b/src/shared/trk/trkdevice.h @@ -51,7 +51,7 @@ struct TrkDevicePrivate; * Trk communications. Provides synchronous write and asynchronous * read operation. * The serialFrames property specifies whether packets are encapsulated in - * "0x90 <length>" frames, which is currently the case for serial ports. + * "0x90 <length>" frames, which is currently the case for serial ports. * Contains a write message queue allowing * for queueing messages with a notification callback. If the message receives * an ACK, the callback is invoked. diff --git a/src/shared/trk/trkutils.h b/src/shared/trk/trkutils.h index d2d9b9a80c55c063994e8c2efe9cb2575e0f4835..0e23338d86fd5d949286874a51f77832380de1b0 100644 --- a/src/shared/trk/trkutils.h +++ b/src/shared/trk/trkutils.h @@ -110,7 +110,7 @@ struct Library struct TrkAppVersion { TrkAppVersion(); - void reset(); + void reset(); int trkMajor; int trkMinor; diff --git a/src/tools/cplusplus/cplusplus.pro b/src/tools/cplusplus/cplusplus.pro index fe3bba5c7367127ba46ebef851cec37bf61ea2a7..c35cabf2c4d6405ceb087e29e995682d5ac890f2 100644 --- a/src/tools/cplusplus/cplusplus.pro +++ b/src/tools/cplusplus/cplusplus.pro @@ -5,7 +5,7 @@ QT = core gui macx:CONFIG -= app_bundle TEMPLATE = app -TARGET = +TARGET = DEPENDPATH += . INCLUDEPATH += . diff --git a/src/tools/makespy/makespy.pro b/src/tools/makespy/makespy.pro index 604f309a261e85aef92f9e2067e5afe0a371b632..ac7d7ea51ff246d63577f7d144f22fadebe2ffe2 100644 --- a/src/tools/makespy/makespy.pro +++ b/src/tools/makespy/makespy.pro @@ -3,4 +3,4 @@ CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp -HEADERS += +HEADERS += diff --git a/src/tools/qdebugger/lean.h b/src/tools/qdebugger/lean.h index b01038f5129b2ad10991d8ee87a6d5048a2904aa..a2d63af4bac9730d02dd191dab89b832e2c00773 100644 --- a/src/tools/qdebugger/lean.h +++ b/src/tools/qdebugger/lean.h @@ -141,7 +141,7 @@ public: return result; } -public: +public: QString m_fileName; }; diff --git a/src/tools/qdebugger/mainwindow.cpp b/src/tools/qdebugger/mainwindow.cpp index 3f2d16540c3b1d8fd026fb2e78826dab7252e53c..4a80587358c0fe5a3a24a3edce7503164ab57358 100644 --- a/src/tools/qdebugger/mainwindow.cpp +++ b/src/tools/qdebugger/mainwindow.cpp @@ -189,7 +189,7 @@ MainWindow::MainWindow() // // Files - // + // QDockWidget *filesDock = new QDockWidget(this); filesDock->setObjectName("FilesDock"); filesDock->setGeometry(QRect(0, 0, 200, 200)); @@ -235,7 +235,7 @@ MainWindow::MainWindow() debugMenu->addAction(m_manager->m_breakAction); //debugMenu->addAction(m_startDebuggerAction); menuBar()->addMenu(debugMenu); - + // // Toolbar // @@ -306,7 +306,7 @@ void MainWindow::loadFiles(const QStringList &fileNames) return; foreach (const QString &fileName, fileNames) loadFile(fileName); - startDebuggingRequest(); + startDebuggingRequest(); } void MainWindow::startDebuggingRequest() @@ -434,7 +434,7 @@ void MainWindow::gotoLocation(const QString &fileName, int line, bool setMarker) Q_UNUSED(setMarker) TextViewer *textViewer = findOrCreateTextViewer(fileName); m_textViewers->setCurrentWidget(textViewer); - + const int blockNumber = line - 1; const QTextBlock &block = textViewer->document()->findBlockByNumber(blockNumber); if (block.isValid()) { @@ -479,7 +479,7 @@ void MainWindow::fileOpen() settings().setValue("FileOpen/LastDir", QFileInfo(fileName).dir().dirName()); if (fileName.isEmpty()) return; - loadFile(fileName); + loadFile(fileName); } void MainWindow::queryCurrentTextEditor(QString *fileName, int *line, QObject **object) @@ -531,7 +531,7 @@ void MainWindow::handleDataDumpersUnavailable() { QMessageBox::warning(this, tr("Cannot find special data dumpers"), tr("The debugged binary does not contain information needed for " - "nice display of Qt data types.\n\n" + "nice display of Qt data types.\n\n" "Make sure you use something like\n\n" "SOURCES *= .../ide/main/bin/gdbmacros/gdbmacros.cpp\n\n" "in your .pro file.") diff --git a/src/tools/qdebugger/mainwindow.h b/src/tools/qdebugger/mainwindow.h index 924cc8c0b21dc68bf9ffb69a6292f554313957aa..6af0dfbcadb58bf74eafd8f27fbdab49fd40b642 100644 --- a/src/tools/qdebugger/mainwindow.h +++ b/src/tools/qdebugger/mainwindow.h @@ -37,7 +37,7 @@ namespace GdbDebugger { namespace Internal { -class DebuggerManager; +class DebuggerManager; } // namespace Internal } // namespace GdbDebugger diff --git a/src/tools/qdebugger/qdebugger.pro b/src/tools/qdebugger/qdebugger.pro index 0b28902f2ce478df33ebd555aa360282a71a7e02..1ec685a7086ecea0804a6a2b05b1335bb0296a61 100644 --- a/src/tools/qdebugger/qdebugger.pro +++ b/src/tools/qdebugger/qdebugger.pro @@ -14,7 +14,7 @@ DEFINES += GDBDEBUGGERLEAN INCLUDEPATH += $${QTCREATOR} INCLUDEPATH += $${QTCREATOR}/gdbdebugger -HEADERS += \ +HEADERS += \ lean.h \ mainwindow.h \ $${QTCREATOR}/gdbdebugger/attachexternaldialog.h \ @@ -83,13 +83,13 @@ FORMS += \ true { DEFINES += USE_BASETEXTEDITOR -DEFINES += TEXTEDITOR_STANDALONE +DEFINES += TEXTEDITOR_STANDALONE INCLUDEPATH += $${QTCREATOR} INCLUDEPATH += $${QTCREATOR}/texteditor INCLUDEPATH += $${QTCREATOR}/../libs -HEADERS += \ +HEADERS += \ $${QTCREATOR}/texteditor/basetextdocument.h \ $${QTCREATOR}/texteditor/basetexteditor.h \ $${QTCREATOR}/texteditor/storagesettings.h \ diff --git a/src/tools/qmldesigner/standalone/standalone.pro b/src/tools/qmldesigner/standalone/standalone.pro index 9c574f855f816b472ad71345d53453ab708e33d3..6b09c847ddfd217fbf09306df36b3013f1823851 100644 --- a/src/tools/qmldesigner/standalone/standalone.pro +++ b/src/tools/qmldesigner/standalone/standalone.pro @@ -42,7 +42,7 @@ include(../../../plugins/qmldesigner/components/themeloader/qts60stylethemeio.pr include (../../../plugins/qmldesigner/core/core.pri) RESOURCES += bauhaus.qrc win32:RC_FILE = bauhaus.rc -macx { +macx { ICON = bauhaus-logo.icns QMAKE_INFO_PLIST = Info.plist } diff --git a/src/tools/qtcreatorwidgets/customwidgets.cpp b/src/tools/qtcreatorwidgets/customwidgets.cpp index 6ee972a97428a0d6f304e1a6a44e687cd29bced5..f590b6bde88d69fe0c5b99c81a3b81b3ac05dc2e 100644 --- a/src/tools/qtcreatorwidgets/customwidgets.cpp +++ b/src/tools/qtcreatorwidgets/customwidgets.cpp @@ -231,7 +231,7 @@ QString DetailsWidget_CW::domXml() const void DetailsWidget_CW::initialize(QDesignerFormEditorInterface *core) { const bool firstTime = !initialized(); - CustomWidget<Utils::DetailsWidget>::initialize(core); + CustomWidget<Utils::DetailsWidget>::initialize(core); if (firstTime) if (QExtensionManager *manager = core->extensionManager()) manager->registerExtensions(new DetailsWidgetExtensionFactory(manager), Q_TYPEID(QDesignerContainerExtension)); diff --git a/src/tools/qtcreatorwidgets/customwidgets.h b/src/tools/qtcreatorwidgets/customwidgets.h index 7785d526eed761d3c33c64c0607b1f9526d24bd7..902a7378704cbc446e323ac6c0fb8122ae59ecaf 100644 --- a/src/tools/qtcreatorwidgets/customwidgets.h +++ b/src/tools/qtcreatorwidgets/customwidgets.h @@ -248,7 +248,7 @@ public: virtual QList<QDesignerCustomWidgetInterface*> customWidgets() const; private: - QList<QDesignerCustomWidgetInterface*> m_plugins; + QList<QDesignerCustomWidgetInterface*> m_plugins; }; #endif // CUSTOMWIDGETS_H diff --git a/src/tools/qtcreatorwidgets/qtcreatorwidgets.pro b/src/tools/qtcreatorwidgets/qtcreatorwidgets.pro index 6dd4d90958af8a36e89d327921c484946232440b..93822c2c33bc7b82a46bf868bdceadf9c9a5f335 100644 --- a/src/tools/qtcreatorwidgets/qtcreatorwidgets.pro +++ b/src/tools/qtcreatorwidgets/qtcreatorwidgets.pro @@ -5,7 +5,7 @@ TEMPLATE = lib HEADERS = customwidgets.h \ customwidget.h -SOURCES = customwidgets.cpp +SOURCES = customwidgets.cpp # Link against the qtcreator utils lib diff --git a/src/tools/qtlibspatcher/binpatch.cpp b/src/tools/qtlibspatcher/binpatch.cpp index 057cd8853b6dedcc32ec0bbad31a573ef8316dfe..ee2ae72aa8e610df82ceb2d4bc1c6ed98682baf0 100644 --- a/src/tools/qtlibspatcher/binpatch.cpp +++ b/src/tools/qtlibspatcher/binpatch.cpp @@ -70,7 +70,7 @@ bool BinPatch::endsWithTokens(const char *data) while(token != NULL) { // check if it ends with the token - if ((tlen >= strlen(token)) + if ((tlen >= strlen(token)) && (strcasecmp((data+tlen)-strlen(token), token) == 0)) return true; token = strtok(NULL, ";"); diff --git a/src/tools/qtlibspatcher/binpatch.h b/src/tools/qtlibspatcher/binpatch.h index 3d7c7aed68b3293cff27e4f443ef8d751d8559b2..f24e6163f919d56ab97ac5265fd3c80c5cc976c2 100644 --- a/src/tools/qtlibspatcher/binpatch.h +++ b/src/tools/qtlibspatcher/binpatch.h @@ -58,7 +58,7 @@ private: long getBufferStringLength(char *data, char *end); bool endsWithTokens(const char *data); - bool patchHelper(char *inbuffer, const char *oldstr, + bool patchHelper(char *inbuffer, const char *oldstr, const char *newstr, size_t len, long *rw); bool useLength; diff --git a/src/tools/qtlibspatcher/qtlibspatcher.pro b/src/tools/qtlibspatcher/qtlibspatcher.pro index 453c4fc7df9522ecc392023f9ff4ae387a01f5c9..83eab9088f51810f7fab7ca4baa5106eaa9fb8bb 100644 --- a/src/tools/qtlibspatcher/qtlibspatcher.pro +++ b/src/tools/qtlibspatcher/qtlibspatcher.pro @@ -5,7 +5,7 @@ CONFIG += console QT -= gui TEMPLATE = app -TARGET = +TARGET = DEPENDPATH += . INCLUDEPATH += . DESTDIR = . diff --git a/src/tools/texteditor/mainwindow.cpp b/src/tools/texteditor/mainwindow.cpp index 693e079b993da83d28d4715200e1fb880c3ab8c3..e3deadde0139bf7c7ed9bd952d1eb92821981c2b 100644 --- a/src/tools/texteditor/mainwindow.cpp +++ b/src/tools/texteditor/mainwindow.cpp @@ -78,9 +78,9 @@ public: { return new MyEditable(this); } - + void setPlainText(const QString &contents) - { + { qDebug() << "Setting contents to:\n" << contents; QPlainTextEdit::setPlainText(contents); } @@ -188,7 +188,7 @@ void MainWindow::fileOpen() settings().setValue("FileOpen/LastDir", QFileInfo(fileName).dir().dirName()); if (fileName.isEmpty()) return; - loadFile(fileName); + loadFile(fileName); } diff --git a/src/tools/texteditor/mainwindow.h b/src/tools/texteditor/mainwindow.h index 57d51b1f228ba7e388f57d511fe3b503cb4aa948..2155b013fff795db4d874b83d948699b03364ff0 100644 --- a/src/tools/texteditor/mainwindow.h +++ b/src/tools/texteditor/mainwindow.h @@ -63,7 +63,7 @@ private: QHash<QString, Editor *> m_textViewerFromName; Editor *findOrCreateTextViewer(const QString &fileName); Editor *currentTextViewer(); - + QSettings &settings(); QAction * m_fileOpenAction; QAction * m_quitAction; diff --git a/src/tools/texteditor/texteditor.pro b/src/tools/texteditor/texteditor.pro index 9e118dba4e2445a5350f278ba18f3a1fcf5fe967..55240168ad3463819320f1202aa408eb34874818 100644 --- a/src/tools/texteditor/texteditor.pro +++ b/src/tools/texteditor/texteditor.pro @@ -3,7 +3,7 @@ QTCREATOR = ../../plugins TARGET = ../../../bin/texteditor -QT += gui +QT += gui CONFIG -= release CONFIG += debug @@ -13,7 +13,7 @@ DEFINES += TEXTEDITOR_STANDALONE INCLUDEPATH += $${QTCREATOR} INCLUDEPATH += $${QTCREATOR}/texteditor -HEADERS += \ +HEADERS += \ mainwindow.h \ $${QTCREATOR}/texteditor/basetextdocument.h \ $${QTCREATOR}/texteditor/basetexteditor.h \ diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 92c3e7b3379f3ce0ceced3b7b98a5a84f5b1d80c..48e0510149bb098716404afd1bb486a7f8ae3b00 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -42,7 +42,7 @@ static QByteArray &operator<<=(QByteArray &ba, const QByteArray &replacement) } -template <typename T> +template <typename T> inline QByteArray N(T t) { return QByteArray::number(t); } static const char gdbmi1[] = @@ -411,7 +411,7 @@ static void testDumper(QByteArray expected0, const void *data, QByteArray outert for (int i = 0; i < l1.size() && i < l2.size(); ++i) { if (l1.at(i) == l2.at(i)) qWarning() << "== " << l1.at(i); - else + else //qWarning() << "!= " << l1.at(i).right(30) << l2.at(i).right(30); qWarning() << "!= " << l1.at(i) << l2.at(i); } @@ -935,7 +935,7 @@ void tst_Debugger::dumpQDateTimeHelper(const QDateTime &d, bool isNull) QByteArray value; if (d.isNull()) value = "value='(null)'"; - else + else value = QByteArray("value='%',valueencoded='2'") << utfToBase64(d.toString()); @@ -2006,7 +2006,7 @@ void tst_Debugger::dumpQObjectSignalList() "numchild='0',addr='$A',type='"NS"QObjectSignal'}," "{name='21',value='columnsMoved(QModelIndex,int,int,QModelIndex,int)'," "numchild='0',addr='$A',type='"NS"QObjectSignal'}]"; - + testDumper(expected << "0" << "0" << "0" << "0" << "0" << "0", &m, NS"QObjectSignalList", true); diff --git a/tests/auto/debugger/tst_plugin.cpp b/tests/auto/debugger/tst_plugin.cpp index 84ffc58a685e55697e5d7c6586a8396afa254ca0..653d66374d3fd4b8fbb2370c6fd86a4fe5c5bf92 100644 --- a/tests/auto/debugger/tst_plugin.cpp +++ b/tests/auto/debugger/tst_plugin.cpp @@ -39,7 +39,7 @@ using namespace Debugger; using namespace Debugger::Internal; - + static QByteArray stripped(QByteArray ba) { for (int i = ba.size(); --i >= 0; ) { diff --git a/tests/auto/fakevim/main.cpp b/tests/auto/fakevim/main.cpp index 370a31355d317c4d2930ac677e03ae368de990ae..bd4fae24599c695b598f013ac3f28d04b4268327 100644 --- a/tests/auto/fakevim/main.cpp +++ b/tests/auto/fakevim/main.cpp @@ -53,7 +53,7 @@ public slots: void changeStatusData(const QString &info) { m_statusData = info; } void changeStatusMessage(const QString &info) { m_statusMessage = info; } void changeExtraInformation(const QString &info) { m_infoMessage = info; } - + private slots: // functional tests void indentation(); @@ -102,7 +102,7 @@ private slots: void test_i_cw_i(); private: - void setup(); + void setup(); void send(const QString &command) { sendEx("normal " + command); } void sendEx(const QString &command); // send an ex command @@ -130,7 +130,7 @@ private: static const QString escape; }; -const QString tst_FakeVim::lines = +const QString tst_FakeVim::lines = /* 0 1 2 3 4 */ /* 0123456789012345678901234567890123457890 */ "\n" @@ -632,7 +632,7 @@ void tst_FakeVim::command_i() check("ibx" + escape, "b@xa" + lines); check("icyy" + escape, "bcy@yxa" + lines); check("u", "b@xa" + lines); - check("u", "@a" + lines); + check("u", "@a" + lines); checkEx("redo", "b@xa" + lines); check("u", "@a" + lines); } @@ -653,7 +653,7 @@ void tst_FakeVim::command_r() setup(); move("4j", "@int main"); move("$", "int main(int argc, char *argv[]@)"); - check("rx", lmid(0, 4) + "\nint main(int argc, char *argv[]@x\n" + lmid(5)); + check("rx", lmid(0, 4) + "\nint main(int argc, char *argv[]@x\n" + lmid(5)); check("2h", lmid(0, 4) + "\nint main(int argc, char *argv@[]x\n" + lmid(5)); check("4ra", lmid(0, 4) + "\nint main(int argc, char *argv@[]x\n" + lmid(5)); check("3rb", lmid(0, 4) + "\nint main(int argc, char *argvbb@b\n" + lmid(5)); @@ -761,13 +761,13 @@ void tst_FakeVim::command_J() { setup(); move("4j4l", "int @main"); - + check("J", lmid(0, 5) + "@ " + lmid(5)); - check("u", lmid(0, 4) + "\nint @main(int argc, char *argv[])\n" + lmid(5)); + check("u", lmid(0, 4) + "\nint @main(int argc, char *argv[])\n" + lmid(5)); checkEx("redo", lmid(0, 5) + "@ " + lmid(5)); check("3J", lmid(0, 5) + " " + lmid(5, 1) + " " + lmid(6, 1).mid(4) + "@ " + lmid(7)); - check("uu", lmid(0, 4) + "\nint @main(int argc, char *argv[])\n" + lmid(5)); + check("uu", lmid(0, 4) + "\nint @main(int argc, char *argv[])\n" + lmid(5)); checkEx("redo", lmid(0, 5) + "@ " + lmid(5)); } diff --git a/tests/auto/icheckbuild/ParseManager.cpp b/tests/auto/icheckbuild/ParseManager.cpp index 781178b8317eca19820b0c279fb8fcd61ee17afc..8c9a3d763340cab0c44a7851e2ab2a44f6ee4285 100644 --- a/tests/auto/icheckbuild/ParseManager.cpp +++ b/tests/auto/icheckbuild/ParseManager.cpp @@ -47,7 +47,7 @@ using namespace CPlusPlus; /********************************** Compares function with function with return type, function name -and their arguments and arguments +and their arguments and arguments types. **********************************/ bool FUNCTIONITEM::isEqualTo(FUNCTIONITEM *cpfct, bool ignoreName/* = true*/) @@ -59,8 +59,8 @@ bool FUNCTIONITEM::isEqualTo(FUNCTIONITEM *cpfct, bool ignoreName/* = true*/) /***************************************************************** Compares two property regarding -of their function definition, -type definition, function arguments +of their function definition, +type definition, function arguments and function types. Q_PROPERTY( ConnectionState state READ state NOTIFY stateChanged); @@ -69,7 +69,7 @@ bool PROPERTYITEM::isEqualTo(PROPERTYITEM *cpppt) { QString thistype = this->trlUnit->spell(this->ast->type_token); QString cppttype = cpppt->trlUnit->spell(cpppt->ast->type_token); - + if(thistype != cppttype) return false; @@ -134,7 +134,7 @@ bool QENUMITEM::isEqualTo(QENUMITEM *cpenum) /***************************************************************** Compares two flags regarding -of their enum definitions and their +of their enum definitions and their values created by the getEnumValueStringList function. *****************************************************************/ bool QFLAGITEM::isEqualTo(QFLAGITEM *cpflag) @@ -173,7 +173,7 @@ void ParseManager::setIncludePath(const QStringList &includePath) /************************************** public Function that starts the parsing -all of the files in the sourceFiles +all of the files in the sourceFiles string list. **************************************/ void ParseManager::parse(const QStringList &sourceFiles) @@ -183,7 +183,7 @@ void ParseManager::parse(const QStringList &sourceFiles) delete pCppPreprocessor; pCppPreprocessor = 0; } - + if (! sourceFiles.isEmpty()) { m_strHeaderFile = sourceFiles[0]; pCppPreprocessor = new CppTools::Internal::CppPreprocessor(QPointer<CPlusPlus::ParseManager>(this)); @@ -225,7 +225,7 @@ void ParseManager::parse(CppTools::Internal::CppPreprocessor *preproc, } } -//This function creates a class list for each class and its base classes in +//This function creates a class list for each class and its base classes in //the header file that needs to be checked. //e.g. // Cl1 Cl2 @@ -297,7 +297,7 @@ QList<CLASSTREE*> ParseManager::CreateClassLists() } /******************************************** -Gets all the baseclass from a class and +Gets all the baseclass from a class and add those base classes into the baseclasslist ********************************************/ void ParseManager::getBaseClasses(const CLASSLISTITEM* pclass, QList<CLASSLISTITEM*> &baseclasslist, const QList<CLASSLISTITEM*> &allclasslist) @@ -326,7 +326,7 @@ void ParseManager::getBaseClasses(const CLASSLISTITEM* pclass, QList<CLASSLISTIT /************************************************** This function finds and creates all Elements wich are significant for MetaDatas. -Those element will be added in the aparameter +Those element will be added in the aparameter lists. **************************************************/ void ParseManager::getElements(QList<FUNCTIONITEM*> &functionlist @@ -445,7 +445,7 @@ void ParseManager::getElements(QList<FUNCTIONITEM*> &functionlist } /********************************************* -Function that starts the comare between the +Function that starts the comare between the parser result and their metadata content. *********************************************/ bool ParseManager::checkAllMetadatas(ParseManager* pInterfaceParserManager) @@ -661,7 +661,7 @@ QList<FUNCTIONITEM*> ParseManager::checkMetadataFunctions(const QList<QList<FUNC } /********************************************* -Helper function to check if a function will +Helper function to check if a function will occure in the MetaData. *********************************************/ bool ParseManager::isMetaObjFunction(FUNCTIONITEM* fct) @@ -674,7 +674,7 @@ bool ParseManager::isMetaObjFunction(FUNCTIONITEM* fct) } /**************************************************** -Check if all function from iclassfctlist are defined +Check if all function from iclassfctlist are defined in the classfctlist as well. It will return all the function they are missing. ****************************************************/ @@ -716,7 +716,7 @@ QList<FUNCTIONITEM*> ParseManager::containsAllMetadataFunction(const QList<FUNCT } /************************************ -Function that gives back an error +Function that gives back an error string for a MetaData function mismatch. ************************************/ @@ -950,7 +950,7 @@ QList<PROPERTYITEM*> ParseManager::containsAllPropertyFunction(const QList<PROPE } /************************************ -Function that gives back an error +Function that gives back an error string for a Q_PROPERTY mismatch. ************************************/ QString ParseManager::getErrorMessage(PROPERTYITEM* ppt) @@ -1125,7 +1125,7 @@ void ParseManager::assignEnumValues(QENUMITEM* qenum, const QList<QList<ENUMITEM } /*********************************** -Function that checkt if the Q_ENUMS +Function that checkt if the Q_ENUMS are completed defined and if the Enum values are the same. ***********************************/ @@ -1161,7 +1161,7 @@ QList<QENUMITEM*> ParseManager::containsAllEnums(const QList<QENUMITEM*> &classq } /************************************ -Function that gives back an error +Function that gives back an error string for a Q_ENUMS mismatch. ************************************/ QString ParseManager::getErrorMessage(QENUMITEM* qenum) @@ -1343,7 +1343,7 @@ QList<QFLAGITEM*> ParseManager::containsAllFlags(const QList<QFLAGITEM*> &classq } /************************************ -Function that gives back an error +Function that gives back an error string for a Q_FLAGS mismatch. ************************************/ QString ParseManager::getErrorMessage(QFLAGITEM* pfg) diff --git a/tests/auto/icheckbuild/ParseManager.h b/tests/auto/icheckbuild/ParseManager.h index e56d82dbe13c3c4c2d5b4f1b0062c52dba1f7387..ee6fb3965265237fbb2f304dab6ef7306282f86d 100644 --- a/tests/auto/icheckbuild/ParseManager.h +++ b/tests/auto/icheckbuild/ParseManager.h @@ -43,7 +43,7 @@ ** chIncludepathlist << getQTIncludePath(); ** chParseManager->setIncludePath(chIncludepathlist); ** chParseManager->parse(chFilelist); -** +** ** if(!chParseManager->checkAllMetadatas(iParseManager)){ ** cout << "Folowing interface items are missing:" << endl; ** QStringList errorlist = chParseManager->getErrorMsg(); diff --git a/tests/auto/qml/qmldesigner/coretests/testcore.cpp b/tests/auto/qml/qmldesigner/coretests/testcore.cpp index a99c7b2649c319354a6a674c139af0da746fa684..9f308a3631018652fad6c71fca57642fc93f01b3 100644 --- a/tests/auto/qml/qmldesigner/coretests/testcore.cpp +++ b/tests/auto/qml/qmldesigner/coretests/testcore.cpp @@ -364,7 +364,7 @@ void TestCore::testModelCreateRect() childNode.variantProperty("y") = 100; childNode.variantProperty("width") = 100; childNode.variantProperty("height") = 100; - + QCOMPARE(childNode.propertyNames().count(), 4); QCOMPARE(childNode.variantProperty("scale").value(), QVariant()); @@ -516,7 +516,7 @@ void TestCore::testTypicalRewriterOperations() QVERIFY(rootModelNode.property("test").isNodeAbstractProperty()); QVERIFY(rootModelNode.property("test").isNodeListProperty()); QVERIFY(!rootModelNode.property("test").isBindingProperty()); - QVERIFY(childNode.parentProperty().isNodeListProperty()); + QVERIFY(childNode.parentProperty().isNodeListProperty()); QCOMPARE(childNode, childNode.parentProperty().toNodeListProperty().toModelNodeList().first()); QCOMPARE(rootModelNode, childNode.parentProperty().parentModelNode()); QCOMPARE(childNode.parentProperty().name(), QString("test")); @@ -1171,7 +1171,7 @@ void TestCore::testModelRemoveNode() void TestCore::reparentingNode() { QScopedPointer<Model> model(Model::create("Qt/Item")); - + QVERIFY(model.data()); QScopedPointer<TestView> view(new TestView); @@ -2566,7 +2566,7 @@ void TestCore::testRewriterExecptionHandling() QVERIFY(rootNode.isValid()); QCOMPARE(rootNode.type(), QLatin1String("Qt/Text")); - try + try { RewriterTransaction transaction = view->beginRewriterTransaction(); rootNode.variantProperty("bla") = QVariant("blah\""); @@ -2702,7 +2702,7 @@ void TestCore::testCopyModelRewriter1() QScopedPointer<TestView> view2(new TestView); model2->attachView(view2.data()); - // read in 2 + // read in 2 QScopedPointer<TestRewriterView> testRewriterView2(new TestRewriterView()); testRewriterView2->setTextModifier(&textModifier2); model2->attachView(testRewriterView2.data()); @@ -2712,7 +2712,7 @@ void TestCore::testCopyModelRewriter1() QCOMPARE(rootNode2.type(), QLatin1String("Qt/Rectangle")); - // + // ModelNode childNode(rootNode1.allDirectSubModelNodes().first()); QVERIFY(childNode.isValid()); @@ -2874,7 +2874,7 @@ void TestCore::testCopyModelRewriter2() QCOMPARE(rootNode1.type(), QLatin1String("Qt/Rectangle")); - // read in 2 + // read in 2 QPlainTextEdit textEdit2; textEdit2.setPlainText(qmlString2); @@ -3107,9 +3107,9 @@ void TestCore::testMetaInfoDotProperties() ModelNode rectNode(view->rootModelNode().addChildNode("Qt/Rectangle", 4, 6, "data")); - + QVERIFY(rectNode.metaInfo().properties(true).keys().contains("pos.x")); - QVERIFY(!rectNode.metaInfo().properties().keys().contains("pos.x")); + QVERIFY(!rectNode.metaInfo().properties().keys().contains("pos.x")); QVERIFY(rectNode.metaInfo().properties(true).keys().contains("pos.y")); QVERIFY(!rectNode.metaInfo().properties().keys().contains("pos.y")); QVERIFY(rectNode.metaInfo().properties(true).keys().contains("border.width")); @@ -3208,7 +3208,7 @@ void TestCore::testStatesRewriter() QVERIFY(state1.isValid()); QVERIFY(!QmlItemNode(rootModelNode).states().allStates().isEmpty()); QCOMPARE(QmlItemNode(rootModelNode).states().allStates().count(), 1); - + QmlModelState state2 = QmlItemNode(rootModelNode).states().addState("state 2"); QVERIFY(state2.isValid()); @@ -4048,7 +4048,7 @@ void TestCore::testQmlModelStateWithName() QVERIFY(!rootNode.isInBaseState()); QCOMPARE(rootNode.instanceValue("width").toInt(), 112); - + view->setCurrentState(view->baseState()); QCOMPARE(rootNode.instanceValue("width").toInt(), 100); @@ -4711,7 +4711,7 @@ void TestCore::testDynamicProperties() QVERIFY(model.data()); TestView *testView = new TestView(model.data()); - model->attachView(testView); + model->attachView(testView); QmlItemNode rootQmlItemNode(testView->rootQmlItemNode()); ModelNode rootModelNode = rootQmlItemNode.modelNode(); @@ -6005,7 +6005,7 @@ void TestCore::changePropertyBinding() { QVERIFY(firstChild.hasProperty("width")); - + BindingProperty widthBinding = firstChild.bindingProperty("width"); QVERIFY(widthBinding.isValid()); QCOMPARE(widthBinding.expression(), QString("parent.width")); @@ -6188,7 +6188,7 @@ void TestCore::changeGradientId() AbstractProperty gradientProperty = rootModelNode.property("gradient"); QVERIFY(gradientProperty.isNodeProperty()); - ModelNode gradientNode = gradientProperty.toNodeProperty().modelNode(); + ModelNode gradientNode = gradientProperty.toNodeProperty().modelNode(); QVERIFY(gradientNode.isValid()); QCOMPARE(gradientNode.id(), QString("pGradient")); @@ -6496,7 +6496,7 @@ void TestCore::testAnchorsAndStates() void TestCore::testStatesWithAnonymousTargets() -{ +{ QSKIP("no states anymore", SkipAll); //QScopedPointer<Model> model(create("import Qt 4.6; Rectangle { states:[State{name:\"s1\";PropertyChanges{target:;x:20}}]Rectangle{x:10} } ")); // ByteArrayModifier* modifier = 0; diff --git a/tests/auto/qml/qmldesigner/propertyeditortests/testpropertyeditor.cpp b/tests/auto/qml/qmldesigner/propertyeditortests/testpropertyeditor.cpp index b8c3166f2cfcdbd708cc9889ba6ecf1da0769ca5..505d7c6d60485a00e51bc794014be8ce7007a30c 100644 --- a/tests/auto/qml/qmldesigner/propertyeditortests/testpropertyeditor.cpp +++ b/tests/auto/qml/qmldesigner/propertyeditortests/testpropertyeditor.cpp @@ -65,7 +65,7 @@ static void inspectPropertyEditor(ModelNode node, QWidget* propWidget) QVERIFY(view); QLineEdit * idLineEdit = view->findChild<QLineEdit* >("IdLineEdit"); - + if (!idLineEdit) return ; @@ -262,7 +262,7 @@ void TestPropertyEditor::createSubNode() void TestPropertyEditor::createRect() { try { - + std::auto_ptr<QWidget> widget(new QWidget()); QScopedPointer<Model> model(Model::create("import Qt 4.6\n Item {}")); diff --git a/tests/auto/qml/qmldesigner/propertyeditortests/testpropertyeditor.h b/tests/auto/qml/qmldesigner/propertyeditortests/testpropertyeditor.h index bb1e3dfd3771d16a94e9caafca8814fff8de5f7b..26061a2e7a3e19810f69e4d85740a449ffa3c5e0 100644 --- a/tests/auto/qml/qmldesigner/propertyeditortests/testpropertyeditor.h +++ b/tests/auto/qml/qmldesigner/propertyeditortests/testpropertyeditor.h @@ -43,7 +43,7 @@ public: private slots: void initTestCase(); void cleanupTestCase(); - + void createCoreModel(); void loadEmptyCoreModel(); diff --git a/tests/auto/qml/qmleditor/lookup/tst_lookup.cpp b/tests/auto/qml/qmleditor/lookup/tst_lookup.cpp index 795f536f8335c6b099d62c10d59f5b6fbe6f128c..b43bc5e5e9d3fec2f712cc5fcd5c5a2a5854df63 100644 --- a/tests/auto/qml/qmleditor/lookup/tst_lookup.cpp +++ b/tests/auto/qml/qmleditor/lookup/tst_lookup.cpp @@ -308,7 +308,7 @@ void tst_Lookup::localRootLookup() // try lookup Symbol *parent = scopes.front(); QmlLookupContext context(scopes, doc, snapshot(doc), typeSystem()); - + Symbol *symbol; symbol = context.resolve("prop"); QVERIFY(symbol); diff --git a/tests/manual/binding/binding.pro b/tests/manual/binding/binding.pro index 2ac26f337aef0e9ae78bca66ddedcfeb66559f79..6c73e184d13a8ec3711ba7eba9811a720211d408 100644 --- a/tests/manual/binding/binding.pro +++ b/tests/manual/binding/binding.pro @@ -1,4 +1,4 @@ -QT = +QT = macx:CONFIG -= app_bundle @@ -9,7 +9,7 @@ TARGET = cplusplus0 include(../../../src/shared/cplusplus/cplusplus.pri) -unix { +unix { debug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared release:OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared debug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared diff --git a/tests/manual/ccdb/cdbapplication.cpp b/tests/manual/ccdb/cdbapplication.cpp index 426cd0172adce174e17e0973f57111d223baa092..8ae44c2c17b8203680b1fc1086e11dd16d3707f3 100644 --- a/tests/manual/ccdb/cdbapplication.cpp +++ b/tests/manual/ccdb/cdbapplication.cpp @@ -182,7 +182,7 @@ void CdbApplication::executionCommand(int command, const QString &arg) } else { std::printf("Starting\n"); const QString binary = args.front(); - args.pop_front(); + args.pop_front(); ok = m_engine->startDebuggerWithExecutable(QString(), binary, args, QStringList(), false, &errorMessage); diff --git a/tests/manual/ccdb/cdbpromptthread.cpp b/tests/manual/ccdb/cdbpromptthread.cpp index 66a13b28942f48f092ece474508838f939b7b259..07e7bc31a48092d7a82ccebc67203913723756cd 100644 --- a/tests/manual/ccdb/cdbpromptthread.cpp +++ b/tests/manual/ccdb/cdbpromptthread.cpp @@ -59,7 +59,7 @@ void CdbPromptThread::run() break; cmd += QString::fromLatin1(buf); if (cmd.endsWith(QLatin1Char('\n'))) { - cmd.truncate(cmd.size() - 1); + cmd.truncate(cmd.size() - 1); if (!cmd.isEmpty() && !handleCommand(cmd.trimmed())) break; cmd.clear(); diff --git a/tests/manual/cdbdebugger/cdbdebugger.pro b/tests/manual/cdbdebugger/cdbdebugger.pro index cc9b4c63182c94e9bac23fd34aeee0b3315468fd..855b775c2e08257bfb2fa030953cf2574609560b 100644 --- a/tests/manual/cdbdebugger/cdbdebugger.pro +++ b/tests/manual/cdbdebugger/cdbdebugger.pro @@ -1,9 +1,9 @@ TEMPLATE = app -TARGET = +TARGET = DEPENDPATH += . INCLUDEPATH += . -DEFINES += +DEFINES += LIBS += Dbghelp.lib dbgeng.lib diff --git a/tests/manual/cdbdebugger/debugger.cpp b/tests/manual/cdbdebugger/debugger.cpp index 14df5688b0bab618977a68dbc2d747eccea713d6..67e0c53934dfbce22afe4d961829c65a9c8ac611 100644 --- a/tests/manual/cdbdebugger/debugger.cpp +++ b/tests/manual/cdbdebugger/debugger.cpp @@ -272,7 +272,7 @@ void Debugger::handleExceptionEvent(DEBUG_EVENT* e) // } else // qDebug() << "SymGetLineFromAddr64 failed w/ error code" << GetLastError(); - // m_currentStackTrace.append(sf); + // m_currentStackTrace.append(sf); // } //} while (bSuccess); diff --git a/tests/manual/cdbdebugger/mainwindow.cpp b/tests/manual/cdbdebugger/mainwindow.cpp index 3cce21189228da781c7133b493ab85b3f499871f..ec16cecfbedfc802e74ca87ff208a5f4c90c0107 100644 --- a/tests/manual/cdbdebugger/mainwindow.cpp +++ b/tests/manual/cdbdebugger/mainwindow.cpp @@ -9,7 +9,7 @@ MainWindow::MainWindow() setupUi(this); connect(&m_debugger, SIGNAL(debugOutput(const QString&)), SLOT(appendOutput(const QString&))); - connect(&m_debugger, SIGNAL(debuggeePaused()), SLOT(onDebuggeePaused())); + connect(&m_debugger, SIGNAL(debuggeePaused()), SLOT(onDebuggeePaused())); } void MainWindow::setDebuggee(const QString& filename) diff --git a/tests/manual/cdbdebugger/windbgthread.cpp b/tests/manual/cdbdebugger/windbgthread.cpp index a21014216ebe67a43407bc294536997a27a1f4ee..75c455832f61e1d231e647e0214f80324c9fba0e 100644 --- a/tests/manual/cdbdebugger/windbgthread.cpp +++ b/tests/manual/cdbdebugger/windbgthread.cpp @@ -123,7 +123,7 @@ void WinDbgThread::internalStartProcess() ZeroMemory(&m_pi, sizeof(m_pi)); DWORD dwCreationFlags = DEBUG_PROCESS | DEBUG_ONLY_THIS_PROCESS; - bSuccess = CreateProcess(m_processFileName.utf16(), NULL, NULL, NULL, FALSE, + bSuccess = CreateProcess(m_processFileName.utf16(), NULL, NULL, NULL, FALSE, dwCreationFlags, NULL, NULL, &si, &m_pi ); diff --git a/tests/manual/fakevim/main.cpp b/tests/manual/fakevim/main.cpp index 2b8717316b0f13bc452eb00c128af719a91f6001..ca8b63efb0a76d25306852e71ca8783492462e90 100644 --- a/tests/manual/fakevim/main.cpp +++ b/tests/manual/fakevim/main.cpp @@ -46,7 +46,7 @@ public slots: { QMessageBox::information(m_widget, "Information", info); } - + void updateStatusBar() { int slack = 80 - m_statusMessage.size() - m_statusData.size(); @@ -96,7 +96,7 @@ int main(int argc, char *argv[]) mw.resize(600, 650); mw.move(0, 0); mw.show(); - + QFont font = widget->font(); //: -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1 //font.setFamily("Misc"); diff --git a/tests/manual/gdbdebugger/simple/plugin.cpp b/tests/manual/gdbdebugger/simple/plugin.cpp index 37be66339f4c08871e003278467506249ebb29de..a2a26e8924ae50bf6d941dc1f66646308d06280f 100644 --- a/tests/manual/gdbdebugger/simple/plugin.cpp +++ b/tests/manual/gdbdebugger/simple/plugin.cpp @@ -35,7 +35,7 @@ extern "C" Q_DECL_EXPORT int pluginTest() { int s = 0; for (int i = 1; i != 2000; ++i) - s += i; + s += i; fprintf(stderr, "in plugin test\n"); return s; } diff --git a/tests/manual/gdbdebugger/spacy path/app with space.cpp b/tests/manual/gdbdebugger/spacy path/app with space.cpp index 0ec979b6b8101a92c87c8121cd56ed48266af010..43cc4fbdf873f44f11494dd2ca505dac246c6dda 100644 --- a/tests/manual/gdbdebugger/spacy path/app with space.cpp +++ b/tests/manual/gdbdebugger/spacy path/app with space.cpp @@ -87,7 +87,7 @@ public: struct Bar { Bar() : ob(0) {} - QObject *ob; + QObject *ob; }; public: @@ -133,7 +133,7 @@ void testHash() hgg0[11] = 11.0; hgg0[22] = 22.0; - + QHash<QString, float> hgg1; hgg1["22.0"] = 22.0; @@ -143,7 +143,7 @@ void testHash() QHash<QString, Foo> hgg3; hgg3["22.0"] = Foo(22); hgg3["33.0"] = Foo(33); - + QObject ob; QHash<QString, QPointer<QObject> > hash; hash.insert("Hallo", QPointer<QObject>(&ob)); @@ -168,7 +168,7 @@ void testIO() qDebug() << "qDebug() 1"; qDebug() << "qDebug() 2"; qDebug() << "qDebug() 3"; - + std::cout << "std::cout @@ 1\n"; std::cout << "std::cout @@ 2\n"; std::cout << "std::cout @@ 3\n"; @@ -195,7 +195,7 @@ void testMap() gg0[11] = 11.0; gg0[22] = 22.0; - + QMap<QString, float> gg1; gg1["22.0"] = 22.0; diff --git a/tests/manual/gdbdebugger/spacy path/plugin with space.cpp b/tests/manual/gdbdebugger/spacy path/plugin with space.cpp index 74ede7ad069169862915c3fee0759ca624a58480..617e0986f975e53df69c77cfce5a60b94007e8d5 100644 --- a/tests/manual/gdbdebugger/spacy path/plugin with space.cpp +++ b/tests/manual/gdbdebugger/spacy path/plugin with space.cpp @@ -34,7 +34,7 @@ extern "C" Q_DECL_EXPORT int pluginTest() { int s = 0; for (int i = 1; i != 2000; ++i) - s += i; + s += i; fprintf(stderr, "in plugin test"); return s; } diff --git a/tests/manual/gdbdebugger/spacy-file/app with space.cpp b/tests/manual/gdbdebugger/spacy-file/app with space.cpp index 0ec979b6b8101a92c87c8121cd56ed48266af010..43cc4fbdf873f44f11494dd2ca505dac246c6dda 100644 --- a/tests/manual/gdbdebugger/spacy-file/app with space.cpp +++ b/tests/manual/gdbdebugger/spacy-file/app with space.cpp @@ -87,7 +87,7 @@ public: struct Bar { Bar() : ob(0) {} - QObject *ob; + QObject *ob; }; public: @@ -133,7 +133,7 @@ void testHash() hgg0[11] = 11.0; hgg0[22] = 22.0; - + QHash<QString, float> hgg1; hgg1["22.0"] = 22.0; @@ -143,7 +143,7 @@ void testHash() QHash<QString, Foo> hgg3; hgg3["22.0"] = Foo(22); hgg3["33.0"] = Foo(33); - + QObject ob; QHash<QString, QPointer<QObject> > hash; hash.insert("Hallo", QPointer<QObject>(&ob)); @@ -168,7 +168,7 @@ void testIO() qDebug() << "qDebug() 1"; qDebug() << "qDebug() 2"; qDebug() << "qDebug() 3"; - + std::cout << "std::cout @@ 1\n"; std::cout << "std::cout @@ 2\n"; std::cout << "std::cout @@ 3\n"; @@ -195,7 +195,7 @@ void testMap() gg0[11] = 11.0; gg0[22] = 22.0; - + QMap<QString, float> gg1; gg1["22.0"] = 22.0; diff --git a/tests/manual/gdbdebugger/spacy-file/plugin with space.cpp b/tests/manual/gdbdebugger/spacy-file/plugin with space.cpp index 74ede7ad069169862915c3fee0759ca624a58480..617e0986f975e53df69c77cfce5a60b94007e8d5 100644 --- a/tests/manual/gdbdebugger/spacy-file/plugin with space.cpp +++ b/tests/manual/gdbdebugger/spacy-file/plugin with space.cpp @@ -34,7 +34,7 @@ extern "C" Q_DECL_EXPORT int pluginTest() { int s = 0; for (int i = 1; i != 2000; ++i) - s += i; + s += i; fprintf(stderr, "in plugin test"); return s; } diff --git a/tests/manual/trk/runner.cpp b/tests/manual/trk/runner.cpp index 25ff2d46847e31343b0fb5ca8986ff0ad3557f51..de98213dbb1c8e5b8286e05abe64f2c9ff02d51c 100755 --- a/tests/manual/trk/runner.cpp +++ b/tests/manual/trk/runner.cpp @@ -212,8 +212,8 @@ void RunnerGui::started() executeCommand("symbol-file filebrowseapp.sym"); //executeCommand("info address CFileBrowseAppUi::HandleCommandL", - // GdbCB(handleInfoMainAddress)); - + // GdbCB(handleInfoMainAddress)); + executeCommand("-break-insert filebrowseappui.cpp:39"); executeCommand("target remote " + m_adapter->gdbServerName()); executeCommand("-exec-continue"); diff --git a/tests/manual/trk/swapendian.pro b/tests/manual/trk/swapendian.pro index d12122e7aa33adcf5184760ba7c9464863707519..2290f2b5331239298335fd4d4c29c3a5e26646db 100644 --- a/tests/manual/trk/swapendian.pro +++ b/tests/manual/trk/swapendian.pro @@ -1,7 +1,7 @@ TEMPLATE = app MAKEFILE = Makefile.swapendian -QT = core +QT = core HEADERS += \ diff --git a/tests/manual/trklauncher/main.cpp b/tests/manual/trklauncher/main.cpp index 50a15f45f217279aeaf4eae47e46663a97c5c2ca..0f8570646dda26aafdb611c2ce074b744523278a 100644 --- a/tests/manual/trklauncher/main.cpp +++ b/tests/manual/trklauncher/main.cpp @@ -67,7 +67,7 @@ static TrkLauncherPtr parseArguments(const QStringList &arguments, bool *bluetoo if (!option.startsWith(QLatin1Char('-'))) break; if (option.size() != 2) - return TrkLauncherPtr(); + return TrkLauncherPtr(); switch (option.at(1).toAscii()) { case 'v': verbosity++;