1. 12 Sep, 2014 1 commit
  2. 11 Sep, 2014 1 commit
  3. 09 Sep, 2014 2 commits
  4. 08 Sep, 2014 3 commits
  5. 05 Sep, 2014 1 commit
  6. 04 Sep, 2014 2 commits
  7. 02 Sep, 2014 2 commits
  8. 29 Aug, 2014 7 commits
  9. 28 Aug, 2014 2 commits
  10. 27 Aug, 2014 3 commits
  11. 25 Aug, 2014 2 commits
    • Nikolai Kosjar's avatar
      C++: Base parsing on editor document instead of widget · 89bd4ee3
      Nikolai Kosjar authored
      
      
      This mainly takes CppEditorSupport apart.
      
      * Parsing is now invoked by CPPEditorDocument itself by listening to
        QTextDocument::contentsChanged().
      
      * Upon construction and destruction CPPEditorDocument creates and
        deletes an EditorDocumentHandle for (un)registration in the model
        manager. This handle provides everything to generate the working copy
        and to access the editor document processor.
      
      * A CPPEditorDocument owns a BaseEditorDocumentProcessor instance that
        controls parsing, semantic info recalculation and the semantic
        highlighting for the document. This is more or less what is left from
        CppEditorSupport and can be considered as the backend of a
        CPPEditorDocument. CPPEditorDocument itself is quite small.
      
          * BuiltinEditorDocumentProcessor and ClangEditorDocumentProcessor
            derive from BaseEditorDocumentProcessor and implement the gaps.
      
          * Since the semantic info calculation was bound to the widget, it
            also calculated the local uses, which depend on the cursor
            position. This calculation got moved into the extracted class
            UseSeletionsUpdater in the cppeditor plugin, which is run once the
            cursor position changes or the semantic info document is updated.
      
          * Some more logic got extracted:
      	- SemanticInfoUpdater (logic was in CppEditorSupport)
      	- SemanticHighlighter (logic was in CppEditorSupport)
      
          * The *Parser and *Processor classes can be easily accessed by the
            static function get().
      
      * CppHighlightingSupport is gone since it turned out to be useless.
      
      * The editor dependency in CompletionAssistProviders is gone since we
        actually only need the file path now.
      
      Change-Id: I49d3a7bd138c5ed9620123e34480772535156508
      Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
      89bd4ee3
    • hjk's avatar
      Use Qt 5's QStringList::join(QChar) · 6431ab2c
      hjk authored
      
      
      Less typing and less cycles than join(QString) where appropriate
      
      Change-Id: I6ebc0e17e4d7fd9845864dd95b7de4ba4dad6906
      Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
      6431ab2c
  12. 22 Aug, 2014 1 commit
  13. 21 Aug, 2014 2 commits
    • Nikolai Kosjar's avatar
      CppTools: Remove concurrent write access to diagnostic messages · 6d70418e
      Nikolai Kosjar authored
      ...in CheckSymbols (highlighting backend). CheckSymbols might run
      concurrently several times with the same CPlusPlus::Document and modify
      the diagnostic messages in an unsave manner. See stack straces below.
      
      While the generated diagnostic messages ("Only virtual functions can be
      marked 'final'", "Too few arguments", ...) are useful, they weren't
      propagated to the editor widget since several minor versions.
      
      =================================================================
      ==23724==ERROR: AddressSanitizer: attempting double-free on 0x60c0072fcd00 in thread T528 (Thread (pooled)):
          #0 0x4787c1 in __interceptor_free (/home/nik/dev/creator/creator-ut_clang-qt5/bin/qtcreator+0x4787c1)
          #1 0x7fa15e5da4ac in QTypedArrayData<unsigned short>::deallocate(QArrayData*) /home/nik/usr/qt-5.3.1/include/QtCore/qarraydata.h:234
          #2 0x7fa15e5d87db in QString::~QString() /home/nik/usr/qt-5.3.1/include/QtCore/qstring.h:995
          #3 0x7fa15e5f4f6a in CPlusPlus::Document::DiagnosticMessage::~DiagnosticMessage() /home/nik/dev/creator/creator-ut/src/libs/cplusplus/CppDocument.h:140
          #4 0x7fa15e5f4de2 in QList<CPlusPlus::Document::DiagnosticMessage>::node_destruct(QList<CPlusPlus::Document::DiagnosticMessage>::Node*, QList<CPlusPlus::Document::DiagnosticMessage>::Node*) /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:432
          #5 0x7fa15e5f4ae9 in QList<CPlusPlus::Document::DiagnosticMessage>::dealloc(QListData::Data*) /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:784
          #6 0x7fa15e5f47ed in QList<CPlusPlus::Document::DiagnosticMessage>::~QList() /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:760
          #7 0x7fa15e7533c2 in QList<CPlusPlus::Document::DiagnosticMessage>::clear() /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:793
          #8 0x7fa15e6f2ed2 in CPlusPlus::Document::clearDiagnosticMessages() /home/nik/dev/creator/creator-ut/src/libs/cplusplus/CppDocument.h:205
          #9 0x7fa15e6c5f5b in CppTools::CheckSymbols::run() /home/nik/dev/creator/creator-ut/src/plugins/cpptools/cppchecksymbols.cpp:337
          #10 0x7fa15e6c83c2 in non-virtual thunk to CppTools::CheckSymbols::run() /home/nik/dev/creator/creator-ut/src/plugins/cpptools/cppchecksymbols.cpp:348
          #11 0x7fa17f0ccab1 (/home/nik/usr/qt-5.3.1/lib/libQt5Core.so.5+0x98ab1)
          #12 0x7fa17f0cfa5e (/home/nik/usr/qt-5.3.1/lib/libQt5Core.so.5+0x9ba5e)
          #13 0x7fa17eaeb181 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8181)
          #14 0x7fa17dbec38c (/lib/x86_64-linux-gnu/libc.so.6+0xfb38c)
      
      0x60c0072fcd00 is located 0 bytes inside of 128-byte region [0x60c0072fcd00,0x60c0072fcd80)
      freed by thread T539 (Thread (pooled)) here:
          #0 0x4787c1 in __interceptor_free (/home/nik/dev/creator/creator-ut_clang-qt5/bin/qtcreator+0x4787c1)
          #1 0x7fa15e5da4ac in QTypedArrayData<unsigned short>::deallocate(QArrayData*) /home/nik/usr/qt-5.3.1/include/QtCore/qarraydata.h:234
          #2 0x7fa15e5d87db in QString::~QString() /home/nik/usr/qt-5.3.1/include/QtCore/qstring.h:995
          #3 0x7fa15e5f4f6a in CPlusPlus::Document::DiagnosticMessage::~DiagnosticMessage() /home/nik/dev/creator/creator-ut/src/libs/cplusplus/CppDocument.h:140
          #4
      
       0x7fa15e5f4de2 in QList<CPlusPlus::Document::DiagnosticMessage>::node_destruct(QList<CPlusPlus::Document::DiagnosticMessage>::Node*, QList<CPlusPlus::Document::DiagnosticMessage>::Node*) /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:432
          #5 0x7fa15e5f4ae9 in QList<CPlusPlus::Document::DiagnosticMessage>::dealloc(QListData::Data*) /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:784
          #6 0x7fa15e5f47ed in QList<CPlusPlus::Document::DiagnosticMessage>::~QList() /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:760
          #7 0x7fa15e7533c2 in QList<CPlusPlus::Document::DiagnosticMessage>::clear() /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:793
          #8 0x7fa15e6f2ed2 in CPlusPlus::Document::clearDiagnosticMessages() /home/nik/dev/creator/creator-ut/src/libs/cplusplus/CppDocument.h:205
          #9 0x7fa15e6c5f5b in CppTools::CheckSymbols::run() /home/nik/dev/creator/creator-ut/src/plugins/cpptools/cppchecksymbols.cpp:337
          #10 0x7fa15e6c83c2 in non-virtual thunk to CppTools::CheckSymbols::run() /home/nik/dev/creator/creator-ut/src/plugins/cpptools/cppchecksymbols.cpp:348
      
      Change-Id: Ifab2842ea43aeb26099835966b02d8afc4b85df4
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
      6d70418e
    • Erik Verbruggen's avatar
      GenericProject: put different languages into separate project parts. · 876ea282
      Erik Verbruggen authored
      
      
      This is in preparation for changes to the ProjectParts, where one part
      can only hold files for 1 language.
      
      Change-Id: I5e9a1a803ecc3ecbb36added0d0094df63922549
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      876ea282
  14. 20 Aug, 2014 7 commits
  15. 19 Aug, 2014 1 commit
  16. 18 Aug, 2014 2 commits
  17. 07 Aug, 2014 1 commit
    • Nikolai Kosjar's avatar
      CppTools: Tests: Add "Find Errors Indexing" mode · 0f3032f8
      Nikolai Kosjar authored
      
      
      Adding QTC_FIND_ERRORS_INDEXING=1 to the run environment will Creator
      force to do some "extended indexing" in order to find bugs:
      
         1) The project files are parsed as if they would be opened in an
            editor. That is, parsing happens as precisely as possible, based on
            the ProjectPart information.
      
         2) Symbols are looked up by invoking CheckSymbols, the backend of the
            semantic highlighter.
      
         3) A "Task List File" (*.tasks) will be written with all diagnostic
            messages.
      
      This special indexing mode is meant for testing purposes. E.g. it can be
      run nightly on some bigger projects to find regressions.
      
      Note that Qt Creator will quit exactly after the first time some source
      files are indexed. E.g. that will happen if you open a file manually or
      if you open a new unconfigured project. Therefore it's required to
      configure projects as needed before invoking in this indexing mode.
      
      Change-Id: If25b83e67d24df9e28e107cb062f21cbf3b4c643
      Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
      0f3032f8