aboutsummaryrefslogtreecommitdiffstats
path: root/src/qtprojectlib
Commit message (Collapse)AuthorAgeFilesLines
* Use XML transformation to convert to Qt/MSbuildMiguel Costa2017-12-225-33/+412
| | | | | | | | | | | | | Convert projects based on custom build steps to Qt/MSBuild. The converted projects do not include generated files for optimized performance. The conversion uses only an XML transformation instead of the Visual Studio SDK. This speeds up the import of .pro files, especially for large projects as the performance of the VS SDK tends to degrade with the number of calls to the COM interfaces. Task-number: QTVSADDINBUG-442 Change-Id: If59a52f44eb2eb4dd99f386c5b695aa56025e900 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Do not add generated files to projectMiguel Costa2017-12-212-51/+33
| | | | | | | | | | | | | | Files generated by the Qt tools are no longer added to the project structure. Source files generated by moc and rcc are included in the build dynamically. This allows for an increase in performance of the VS Tools (e.g. when adding header files to a project, 90% of the time is spent processing generated files). NOTE: Only works for new files/projects. This patch breaks import and conversion of existing projects. Fixed in a following patch. Task-number: QTVSADDINBUG-64 Change-Id: I8762adfc08962a54da256fe5ced6e1ec4504caaf Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix command line parser not working when adding moc fileMiguel Costa2017-12-202-2/+4
| | | | | Change-Id: I51acae97067da9ab1876fa53630393b89a4b551b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Convert custom build command strings with multiple lines2.1Miguel Costa2017-12-122-7/+22
| | | | | | | | | | | | | When converting custom build steps to Qt/MSBuild target items, the conversion procedure will now be able to handle command strings with multiple lines. In these cases, only the sub-string with the relevant command will be considered. Custom build steps with multiple lines are potentially problematic, e.g. if empty lines are present in the command string (see associated issue for example of this problem). Task-number: QTVSADDINBUG-414 Change-Id: I93ae2f233ee35d27462b9087ada58b1134102e87 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Replace custom build steps with MSBuild targetsMiguel Costa2017-12-018-334/+3244
| | | | | | | | | | | | Overhaul of Qt tool (moc, rcc, uic) usage in generated projects. Running the Qt tools on project files no longer relies on custom build steps but rather on Qt-specific MSBuild targets that are installed together with the VS Tools. Older projects generated with previous versions of the VS Tools can be converted to use the MSBuild targets Conversion is not mandatory as custom build steps are still supported. Change-Id: I4c01491b2c263deb2cdf2c5fcc12ecdf718eb11f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix lupdate not working with Qt 5.9Miguel Costa2017-10-202-158/+166
| | | | | | | | | | | | | When the command line to run lupdate was too long to specify individual source files, a temporary .pro file was created instead. The processing of the .pro file then triggered the same issue as QTVSADDINBUG-472 (qmake unable to find cl without VC vars). Removed the need for the temporary .pro file by using the '@' option of lupdate (added a call to SetVCVars() before running lupdate, just to be on the safe side). Task-number: QTVSADDINBUG-491 Change-Id: I6bce4c1c72093eceee8d1951bbbe464c072ba1a3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove warning of unreferenced variableMiguel Costa2017-10-111-1/+1
| | | | | | | Removed an unused variable declaration that was generating a warning. Change-Id: I52859561f5b99756104e942ebf3d5a25afacbef0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Redesign moc step for cpp files to allow generic macro expansionMiguel Costa2017-10-111-106/+201
| | | | | | | | | | | | | The moc step for cpp files was redesigned to allow macros like %(RelativeDir) to be used in the output path. Previous approach relied on a single .moc file acting as both source of the custom build step and as output. The new approach uses a dummy file for the custom build step definition (similar to moc_predefs.h.cbt) required to generate the .moc file. Task-number: QTVSADDINBUG-105 Change-Id: Ia202fca8a5c6df1ca0d9e64a5719726155555bbe Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix moc output filename clashesMiguel Costa2017-10-114-13/+238
| | | | | | | | | | Modified moc step to allow macros like %(RelativeDir) to be used in the output path. This enables the support of projects with moc source files with the same name in different directories. Task-number: QTVSADDINBUG-105 Change-Id: Ia34edae3d1f63f5f3af2ae52dbe1cfaef7fafb35 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix creating bad project if "flat" flag is removedMiguel Costa2017-09-141-1/+1
| | | | | | | | | | | | | | During .pro file import, RefreshRccSteps() now looks into subfilters for rcc outputs to remove instead of just the top-level filter. In the case where qmake generated a project structure with rcc outputs in the "Generated Files/debug" and "Generated Files/release" filters (which is the case with CONFIG -= flat), RefreshRccSteps() did not correctly handle these outputs as it only looked for them in the topmost "Generated Files" filter. Task-number: QTVSADDINBUG-439 Change-Id: I2b71f0a511b2dd487f01f08fbc201e5f5006f72c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix setting QTDIR after LocalDebuggerEnvironment in the .user fileMiguel Costa2017-09-131-0/+22
| | | | | | | | | | | | In VS2013/15, if the LocalDebuggerEnvironment property is already defined when setting the QTDIR property, then it will be stored in the .user file before the QTDIR property, which is an error because there is a dependency. To work around this, we first remove the property and then add it after QTDIR is set. Task-number: QTVSADDINBUG-363 Change-Id: Iddeb27e5d719c3da6623dbcee735b7f3fc4b3604 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Set vcvars before calling qmakeMiguel Costa2017-08-141-50/+115
| | | | | | | | | | Instead of calculating the path to the compiler, calls the vcvars batch file and adds the environment variables to the qmake process start information. This ensures that qmake will have all available details about the compiler. Change-Id: Ie2f82851c57677ddc8bd186a920585e591122fe5 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Update version number to 2.1.2Miguel Costa2017-08-031-2/+2
| | | | | Change-Id: I2b425131f56c44d7a3fc172bf43b3dc11817971a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix run moc'ing at every build even if there is no file changedMiguel Costa2017-08-031-1/+1
| | | | | | | | | | | | Changed DeleteFilesFromFilter to exclude .cbt files. These files are generated by qmake when importing the .pro file and should not be deleted. DeleteFilesFromFilter deletes moc_predefs.h.cbt and this causes the moc_predefs.h file to be generated at every build. Task-number: QTVSADDINBUG-410 Change-Id: I9793751baf8eb948b647bedf04109b4df1d32aae Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix opening pro file with Qt 5.9Miguel Costa2017-07-262-1/+84
| | | | | | | | | | | Before invoking qmake, add path of compiler to the environment. qmake requires this in order to invoke the compiler during conversion. Calculation of the compiler path extracted from vcvars.bat Task-number: QTVSADDINBUG-472 Change-Id: I148dd9aac60830357b3553c4b55faa70c9ed9642 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix new item with VS not generating the mocMiguel Costa2017-07-251-0/+4
| | | | | | | | | | Checks if item is of type CustomBuild before accessing custom tool information. Accessing the custom tool information before setting the item type to CustomBuild generates an exception while adding the moc. Task-number: QTVSADDINBUG-396 Change-Id: Icec885894e6c3abd78b324f98a6028c41f1a2029 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix reported issues against the VS2017 beta releaseKarsten Heimrich2017-03-172-0/+15
| | | | | | | | | | | * Update Prerequisite toolset * Use the right PlatformToolset version * Disable AddFilter code causing an infinite loop * Update the checksum after patching the vsixmanifest file Task-number: QTVSADDINBUG-459 Change-Id: I9e3054734a2039b9ad5af2e9f2d275356d074d31 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Add support for Visual Studio 2017Karsten Heimrich2017-03-092-1/+3
| | | | | | Task-number: QTVSADDINBUG-459 Change-Id: I91b801aa1061e72541e6a77aa9d317e238f58593 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Update to patch level release version 2.1.1Karsten Heimrich2017-03-081-2/+2
| | | | | Change-Id: Ie68f4a12decd6dc197cc556da53ca6581abeb71f Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Dump exception to the debug output pane, don't show message boxesKarsten Heimrich2017-02-061-1/+2
| | | | | Change-Id: I94ced1a8e951c865da9d63f39187f50908274622 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Do not crash if the file to adjust does not existKarsten Heimrich2017-02-061-0/+3
| | | | | | | | | | Return early if the file does not exists. In case of an exception, dump it to the debug output pane instead of showing countless message boxes. Task-number: QTVSADDINBUG-453 Change-Id: Ie97a733b72f6da5deca099bb19ba3e2a1ca54d0c Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Update version number, copyright, assembly info, READMEv2.1.0Karsten Heimrich2017-01-271-3/+3
| | | | | Change-Id: I6d82544fb98afcba8911cb58ed21cdaad61e7681 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Wait until all task finished, fixes broken repair functionKarsten Heimrich2017-01-111-9/+11
| | | | | Change-Id: I25929f46f1c0d68515107d693dedbb0d7154521a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Remove overload, use default argument insteadKarsten Heimrich2017-01-111-6/+1
| | | | | Change-Id: Id133f375ba1b1e916fde739c9e2ea06f096be0f7 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Reuse the already existing fullPath variableKarsten Heimrich2017-01-091-4/+5
| | | | | Change-Id: Ibcaa841b3daabcd7512104622775bebe256ae721 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Use of parallelism for Q_OBJECT parsing during .pro file importKarsten Heimrich2017-01-091-9/+18
| | | | | | | | | | First step to speed up the import of Qt projects from .pro files. Execute parsing for Q_OBJECT, Q_GADET macros in parallel and move it to a background task to not block the UI. This gains us close to 50% on a capable machine in combination with the former patch. Change-Id: Icb8acb1a633833dc490e94e3c9609894d30a7d4b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Some better performance while parsing C++ filesKarsten Heimrich2017-01-092-26/+62
| | | | | | | | Load the file as a whole and perform an initial search on the file before parsing line by line, e.g. to find Q_OBJECT, Q_GADGET macro. Change-Id: Ied69749be6ce5c2e92a31da211df087f580db5d2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Cleanup superfluous code path, merge implementationKarsten Heimrich2017-01-092-46/+32
| | | | | Change-Id: Iab67c15c3e0e597c2e8ee535e59a5668039efe7a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Cache the Qt version informationKarsten Heimrich2017-01-093-23/+35
| | | | | | | | | | The version manager did this before, but not the actual class itself. Since this class could be instantiated on its own, we had to obtain the stored information again and again from qmake which is quite expensive. (Noticed while importing a large .pro) Change-Id: I8462b9cf76758fff89323cd78aa59cf8cc82e124 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Unify file extension checkingKarsten Heimrich2017-01-095-77/+77
| | | | | Change-Id: I1323a3fcddf0c8733f59ce210c304564587f0534 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Minor style changesKarsten Heimrich2017-01-094-4/+3
| | | | | Change-Id: I75d5bdee8aa115372eb4171cef4667cb1458e009 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Reuse TextMate language files for QML and qmake syntax highlightingKarsten Heimrich2017-01-064-1/+109
| | | | | | | | | | | | | | We remove our rather slow Classifier implementation and reuse the existing files from Baptist Benoist and cpp-qt.tmbundle. The aforementioned files implement QML and qmake syntax highlighting based on Visual Studio's capability to load TextMate bundles. Reference repositories: vscode-qml: https://github.com/bbenoist/vscode-qml cpp-qt.tmbundle: https://github.com/textmate/cpp-qt.tmbundle Change-Id: Ie3d0e01e1991b441c8e02e45a9fef3674844d9bf Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Compile fix for Visual Studio 2013Karsten Heimrich2016-12-202-3/+3
| | | | | Change-Id: I085f12b3d621486980631533daf27de21d045564 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix writing the moc_*.inc fileKarsten Heimrich2016-12-021-6/+22
| | | | | | | | | MOC uses a different parser now and will not understand the old format, write it in a way MOC can handle it. Also fix splitting the include path to support path with spaces, like ".\foo bar\". Change-Id: I806fa284f76c80291adef3e65caa8ec21cbcbf82 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix wrong usage of QT_STATIC and QT_DLLKarsten Heimrich2016-12-011-0/+7
| | | | | | Task-number: QTVSADDINBUG-445 Change-Id: I285c04fef5fdde04d110546d7cc19222b9f0acd2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use the ShellSettingsManager for registry reading/writingKarsten Heimrich2016-11-221-2/+8
| | | | | Change-Id: I0108194afd445bbefb4b433a39e9e92a1634a718 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix: Environment variables are not saved/restored after VS restartKarsten Heimrich2016-11-181-3/+18
| | | | | | Task-number: QTVSADDINBUG-407 Change-Id: I6a93b2eff62abb6c7f16b5eb8147a9541d0fdd3d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/2.0' into devAlex Blasche2016-11-161-2/+1
|\ | | | | | | Change-Id: Ibf35fe4e76389edb8e2a4cd150de6a5512d38107
| * Implement conditional configuration includes2.0Karsten Heimrich2016-11-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | Since the VS Gallery expects each VSIX having a different GUID, we need to have a separate .vsixmanifest file per VS version. Put the configuration stuff in a dedicated directory, split the AfterBuild from the actual .csproj and have a .targets file and .vsixmanifest per Visual Studio version. Update the README file. Change-Id: I32ffee1c40345812b7f2232987e4e7a5b20c3da6 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Remove repeated 'Module' word in function callKarsten Heimrich2016-11-141-1/+1
| | | | | | | | | | Change-Id: I822faf9a0c3132e1f11945be8a98c7ce499c819a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Fix expression will always be trueKarsten Heimrich2016-11-141-1/+1
| | | | | | | | | | Change-Id: I4a70375ba64c1c43629bf7bb55180d3dba773c12 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Fix virtual member call in constructorKarsten Heimrich2016-11-143-8/+28
| | | | | | | | | | Change-Id: I8a62e0dfb1376eadbd77f10a75101ba11c7105dc Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Code change: Rewrite to use property syntax, remove unused codeKarsten Heimrich2016-11-142-57/+20
| | | | | | | | | | Change-Id: I3f0b5a8676dc1463014c460ab4455cd1ad188e9d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Code change: Use property syntax where possibleKarsten Heimrich2016-11-144-78/+12
| | | | | | | | | | Change-Id: I533817d5b533fa03bdd63f1826d3116b16a5e638 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Remove unused function and code that could never be reachedKarsten Heimrich2016-11-141-14/+0
| | | | | | | | | | Change-Id: I1781a7bd28e3dada309852f029dfe2de9d781571 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Compress code with some useful Linq constructsKarsten Heimrich2016-11-141-38/+10
| | | | | | | | | | Change-Id: I2e2b015bd4b2df499eae23ba1e003576f6e40e29 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Refactor function and remove duplicated codeKarsten Heimrich2016-11-141-8/+4
| | | | | | | | | | Change-Id: I51fec66240738e1e674cea9fed357b32c4cba563 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Fix expression will always be falseKarsten Heimrich2016-11-143-7/+1
| | | | | | | | | | Change-Id: I73a48a71d5e1769f62d7a9d4f6bbcfdf123176ad Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Code change: Remove superfluous method and value checkKarsten Heimrich2016-11-141-13/+4
| | | | | | | | | | Change-Id: I1abff052ae5caabf62afe20712c76eb16506f943 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Code change: Comment unused types and modulesKarsten Heimrich2016-11-142-5/+5
| | | | | | | | | | Change-Id: I3f18fb0ae7368128c5aac6deb46eb92bc57ae0aa Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>