aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools/cpplocatorfilter_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CppLocatorFilter: Add highlighting auto-testsAndre Hartmann2019-09-101-2/+53
| | | | | Change-Id: Ibd5b8318040876b46bfb14561c69019abd8dd8b7 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppLocatorFilterTest: De-noiseAndre Hartmann2019-08-251-163/+161
| | | | | Change-Id: Ie7c8bdb55764a229b24a9acf68d1e93d82f5edef Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CppTools: Allow enabling debugging of locator filter tests by environmentNikolai Kosjar2019-07-111-1/+1
| | | | | Change-Id: I9786b7c6959b77eebb1bc774d2e7bd4c8ed3edeb Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-2/+2
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Make FileName::shortNativePath a memberhjk2019-05-201-2/+2
| | | | | Change-Id: If1ab02ae9dc7efb97792cdf3bbdce3bba18b3e3d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CppTools: modernizeAlessandro Portale2019-01-211-6/+5
| | | | | | Change-Id: Iaf02e4d026f1ac8b216833d83cd7a735e21ff60a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CppLocatorFilter: Fix result sortingAndre Hartmann2018-11-021-9/+13
| | | | | | | | | | | * Fix rating items with startsWith()/contains() higher * Rate matches in function parameter list lower Task-number: QTCREATORBUG-19377 Change-Id: I2ea4c3ba96cd086aef82627326fa0888f700850f Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Fix getting locator filters from the object poolIvan Donchevskii2018-06-281-4/+6
| | | | | | | | | They are no longer inside the global object pool. Get them from CppModelManager instead. Task-number: QTCREATORBUG-20678 Change-Id: Ifb3221a812295e1dcfe8b59ea693a4b350cbcc2e Reviewed-by: David Schulz <david.schulz@qt.io>
* Locator: Cleanup and modernize Locator and filtersAndre Hartmann2017-12-301-9/+9
| | | | | | | | | | | | * Omit QLatin1{Char|String} * Use member initialization * Use range-based-for (and fixed the cases with non-const Qt container) * Sort includes to common style Change-Id: Ibc33a732bb153862efd6d5febfac758229cb61d4 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* CppTools: Fix highlighting when matching with scopeOrgad Shaneh2017-11-141-0/+19
| | | | | | | | | | | | | | | class Foo { void funcInside() {} void funcOutside(); }; void Foo::funcOutside() {} Search for Foo::func in the locator. func was not highlighted. Change-Id: I923bd3ef2df47c5fa030b8899d1b4df7437b1820 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Match also function arguments in locatorOrgad Shaneh2017-11-021-2/+19
| | | | | | | Useful when there are several overloads for the same function. Change-Id: I325bda7d2fdf4108f71a61d5473cd55310c51c28 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Locator: Add camel hump locator filter for C++, QML, and filesAndre Hartmann2017-09-191-0/+13
| | | | | | | | | | | | | * Use the CamelHumpMatcher in the C++, QML, and files filters * Supports matching against UpperCamelCase, lowerCamelCase and snake_case strings * Supports highlighting of matched characters Task-number: QTCREATORBUG-3111 Started-by: David Kaspar <dkaspar@blackberry.com> Change-Id: If6220191432ef965bde3c8dbe4a10d89e222ba6f Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CppTools: fix metatype registration macro usageNikita Baryshnikov2016-03-241-2/+0
| | | | | | | | in places where we do not need it Change-Id: Ibf35f8144da859fffa3e0a7b6bb262284ec2292a Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* CppTools: Add file path to extra info in function Locator filter.Christian Kandeler2016-02-041-17/+21
| | | | | | | | | | | This helps tremendously in the not uncommon case of the same class being implemented in several files (e.g. for different operating systems). Until now, users would be completely at a loss as to which of the results was the one they were interested in. Change-Id: I3ef8c8dc93b89e68eaf323a7ad2067b075d8cfb1 Task-number: QTCREATORBUG-11125 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* CppTools: Tests: time out in waitForFileInGlobalSnapshot()Nikolai Kosjar2015-02-181-1/+1
| | | | | Change-Id: I0bf7d826d53749c5fd1be1e4f3c2faa403d13342 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
* Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'Eike Ziller2015-02-121-6/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/tooltip/tipcontents.cpp src/libs/utils/tooltip/tipcontents.h src/plugins/android/androiddeployqtstep.cpp src/plugins/baremetal/baremetalconstants.h src/plugins/baremetal/baremetaldevice.cpp src/plugins/baremetal/baremetaldevice.h src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp src/plugins/baremetal/baremetaldeviceconfigurationwidget.h src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h src/plugins/baremetal/baremetalplugin.cpp src/plugins/baremetal/baremetalplugin.h src/plugins/baremetal/baremetalruncontrolfactory.cpp src/plugins/baremetal/baremetalruncontrolfactory.h src/plugins/cppeditor/cppcodemodelinspectordialog.cpp src/plugins/cppeditor/cppdoxygen_test.cpp src/plugins/cppeditor/cppdoxygen_test.h src/plugins/debugger/breakpointmarker.cpp src/plugins/debugger/debuggeritemmodel.cpp src/plugins/debugger/debuggeritemmodel.h src/plugins/debugger/loadcoredialog.cpp src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp src/plugins/projectexplorer/addnewmodel.cpp src/plugins/projectexplorer/addnewmodel.h src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp src/plugins/qmlprofiler/abstracttimelinemodel.cpp src/plugins/qmlprofiler/abstracttimelinemodel.h src/plugins/qmlprofiler/notesmodel.cpp src/plugins/qmlprofiler/qml/CategoryLabel.qml src/plugins/qmlprofiler/qml/MainView.qml src/plugins/qmlprofiler/qml/Overview.js src/plugins/qmlprofiler/qml/Overview.qml src/plugins/qmlprofiler/qml/TimeDisplay.qml src/plugins/qmlprofiler/qml/TimeMarks.qml src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp src/plugins/qmlprofiler/sortedtimelinemodel.cpp src/plugins/qmlprofiler/sortedtimelinemodel.h src/plugins/qmlprofiler/timelinemodelaggregator.cpp src/plugins/qmlprofiler/timelinemodelaggregator.h src/plugins/qmlprofiler/timelinerenderer.cpp src/plugins/qmlprofiler/timelinerenderer.h src/plugins/qmlprojectmanager/QmlProjectManager.json.in src/plugins/texteditor/findinfiles.cpp src/plugins/vcsbase/vcsconfigurationpage.cpp src/shared/qbs src/shared/scriptwrapper/interface_wrap_helpers.h src/shared/scriptwrapper/wrap_helpers.h tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp tests/system/suite_debugger/tst_debug_empty_main/test.py tests/system/suite_debugger/tst_qml_js_console/test.py tests/system/suite_debugger/tst_qml_locals/test.py Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
| * Update LicenseEike Ziller2015-01-161-6/+6
| | | | | | | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | CppTools: Fix flaky test_cpplocatorfilters_CppLocatorFilterNikolai Kosjar2014-12-191-0/+2
|/ | | | | | | The GenericProjectManager tests left over some state in CppModelManager. Change-Id: I3f5c5bf27b9443e6753eb6c24114e2e5b99e7372 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* ObjC++: also index ObjC symbols.Erik Verbruggen2014-07-241-0/+23
| | | | | | | | @classes, @protocols, @properties and -methods (and +methods) will now show up in the locator. Change-Id: I33f904c456c321fc80b8aba7ff52d5f1207c58be Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++ tests: increase verbosity to simplify debugging.Erik Verbruggen2014-06-171-2/+10
| | | | | Change-Id: Ib92418898d627b9b07b861a0255684c8f925f814 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* DocumentModel: Make interface statichjk2014-05-131-2/+2
| | | | | | | Move item model implementation to private, adjust user code. Change-Id: Ifbe94e7c7b9b1e8be1b4c531958dbd7a9413af13 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Core: Merge Find and Locator into Core pluginhjk2014-01-141-3/+1
| | | | | | | Change-Id: I7053310272235d854c9f409670ff52a10a7add8b Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Merge remote-tracking branch 'origin/3.0'Eike Ziller2014-01-081-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: share/qtcreator/debugger/dumper.cpp share/qtcreator/debugger/dumper_p.h share/qtcreator/debugger/test/main.cpp src/plugins/debugger/gdb/classicgdbengine.cpp src/plugins/debugger/gdb/pythongdbengine.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.h src/plugins/debugger/lldblib/guest/main.cpp src/plugins/debugger/lldblib/ipcengineguest.cpp src/plugins/debugger/lldblib/ipcengineguest.h src/plugins/debugger/lldblib/ipcenginehost.cpp src/plugins/debugger/lldblib/ipcenginehost.h src/plugins/debugger/lldblib/lldbenginehost.cpp src/plugins/debugger/lldblib/lldboptionspage.cpp src/plugins/qbsprojectmanager/qbsstep.cpp src/plugins/qbsprojectmanager/qbsstep.h src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp src/plugins/qnx/blackberrycheckdevmodestep.cpp src/plugins/qtsupport/debugginghelper.cpp Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
| * Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | | | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | CppEditor/CppTools: Avoid triggering garbage collector on editor close in testsNikolai Kosjar2014-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | Closing an editor might trigger a timer which leads to the invocation of the garbage collector. This is unfavourable for the plugin tests since a test function closing an editor might influence a subsequent test function (e.g. files get removed from the global snapshot although they were added shortly before). Change-Id: Ia80c11f99e2437fe145dc2d983b21962539b5181 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppEditor/CppTools: Don't continue in test function on failureNikolai Kosjar2014-01-071-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | QVERIFY/QCOMPARE are meant to be called in the test function so that on failure they just can "return" and thus skip subsequent code. Since we use reusable test code in the test functions (the *TestCase classes), we need to ensure that on failure no further test code is executed. This mostly inlines the run function of the test classes into the constructor. Change-Id: I320ee032bdde0174ddfe3fdf3f9e18e19abf1d7f Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppEditor/CppTools: Clean up *Test* classesNikolai Kosjar2014-01-071-25/+37
| | | | | | | | | | | | | | | | * Unify class names * Fix coding style Change-Id: I7498192ba9e6b9fc0e97d3d4f0dbb30f1853a0c9 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppEditor/CppTools: Introduce Test{Case,Document}Nikolai Kosjar2014-01-071-38/+17
| | | | | | | | | | | | | | Move common functionality of the 12 test classes into base classes. Change-Id: If64d3cec876807ac6f991151189860a99b8ff4ca Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppEditor/CppTools: Tests: Fix potential race conditionNikolai Kosjar2013-12-121-1/+1
|/ | | | | | | | ...when updating the code model. Change-Id: Ifc55b7d0bb795b9cfd72465990991bc2cc907846 Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Revert "EditorManager: Fix crash when closing an editor upon activation"Orgad Shaneh2013-10-081-3/+5
| | | | | | | | | | | | | | | Deleting an editor while currentEditorChanged is apparently not a good idea. Use a queued connection instead. This reverts commits 243a6259618e69b8da9ac2438480c449754f7f77, 447c4ed37f8904ca733d6e6253ad19bb0388f209, d9602ca550c53e60a5229bfec9539e41fa5a694c and 31034870389a512e3450e32ed990e1622bd6e679. Change-Id: Iccbee25fb77714963faa6f7184d1f5f53ed348a6 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* CppTools: Show function args in current document filterNikolai Kosjar2013-10-021-19/+19
| | | | | | | Regression introduced by commit 190fb44. Change-Id: Ibd47b6d316e5ae976fb448aad5062eb5887f10e6 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Tests: Move TestDataDir into plugintestutils.{h,cpp}Nikolai Kosjar2013-10-021-3/+1
| | | | | Change-Id: I76d5e421258eda85907e56762a59894ce7f84f13 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppEditor/CppTools: Fix plugin tests in master.Nikolai Kosjar2013-10-011-2/+2
| | | | | Change-Id: Ia641c70f8c72cf762cf571cdd505385d28492b7c Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Locator Tests: Make test data more descriptiveNikolai Kosjar2013-09-131-10/+10
| | | | | Change-Id: I23e88c8a04f82d51651038b38faf07057244fede Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Fix qualified ids in the ':' locator filterNikolai Kosjar2013-09-131-22/+45
| | | | | | | | | | | * Always display qualified ids in the ':' filter * Show correct qualified ids (for some symbols the namespace was shown twice) Task-number: QTCREATORBUG-10136 Change-Id: Id178cb4b8abcc316250fa16e5f3e5a8e72bc0c10 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Introduce LocatorDataNikolai Kosjar2013-08-301-2/+2
| | | | | | | | | | | | | | | | Until now the locator filters CppLocatorFilter, CppClassesFilter and CppFunctionsFilter used unnecessarily their own SearchSymbols instance. The results were also saved separately, which was unfavorable since e.g. the functions and classes data could be shared. Starting with this patch an instance of LocatorData will serve all mentioned filters. This saves about 20MB of memory after indexing the Qt Creator project. Change-Id: I8a34b67eb9fe0e5c68ba6e7c8f576389c78efc6f Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Fix displaying symbols of CppLocatorFilterNikolai Kosjar2013-08-301-12/+9
| | | | | | | | | | The left column of the locator filter displayed the fully qualified name, which is a bit too long... Regression introduced by commit 760aa0f. Change-Id: I57fb44cd205c6e54158de22b6638e4a28014749c Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* EditorManager: Use static pattern, adjust surrounding codehjk2013-08-301-1/+1
| | | | | Change-Id: I3255a0150cd9a730336456c5a9f986eb74fefbff Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* CppTools: Locator: Match also against qualified namesNikolai Kosjar2013-08-261-0/+18
| | | | | | | | | | | | If the user input contains "::", match against the qualified symbol name. Otherwise, as before, match against the unqualified symbol name. This applies to the function and class filters and allows to narrow down the results by using a namespace prefix, e.g. "c core::*category". Change-Id: Id152f412740e27f2f2d001dc7008dba8a92a37ce Reviewed-by: David Schulz <david.schulz@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Get rid of SearchSymbols::setSeparateScope()Nikolai Kosjar2013-08-261-1/+1
| | | | | | | | This will make it easier to use a single SearchSymbols instance and a single run serving all locator filters. Change-Id: Idb6a3693ad356227d46d0b28fb4c3a5db62b4ac4 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Tests: Correct input data in locator test caseNikolai Kosjar2013-08-221-4/+10
| | | | | | | ...in order to test more entries. Change-Id: I990f55dd3c9c2c7d079a4fb3dcc92467bf1d1568 Reviewed-by: David Schulz <david.schulz@digia.com>
* Locator: Case sensitivity of input affects prioritizingNikolai Kosjar2013-08-221-3/+3
| | | | | | | | | | | | | | | | | | | So far candidates were prefix matched case sensitive which led to an unfavorable results order. With this patch, if the input is lower case, the prioritizing happens by a case insensitive prefix match. Otherwise the match happens case sensitive (just like before). Example: Search for e.g. "m cppmodelmanager" Top result before: AbstractEditorSupport (match at parameter type) Top result now: CppModelManager Change-Id: Ic27042cfe717be812a2237a3437399597c98dd74 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: David Schulz <david.schulz@digia.com>
* Tests: Extract TestDataDir to the corepluginNikolai Kosjar2013-08-201-40/+7
| | | | | Change-Id: Ie290c07c07c13134a57f328e9ae876b2af6974db Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Tests: Add basic tests for locator filtersNikolai Kosjar2013-08-191-0/+283
Change-Id: Ie71aa8a39f4584a024a4f104841ad8e57947e489 Reviewed-by: David Schulz <david.schulz@digia.com>