Commit Graph

44349 Commits

Author SHA1 Message Date
Ulf Hermann
08b780205a Theme: Use QVariantMap for theme properties
QML can directly mirror this into a JavaScript object, so there is no
need to manually copy the values into a different container. Also,
QQmlPropertyMap is very expensive as it will listen to changes to any
value in the map. We never use this. It would be entirely enough to
update the whole map at once if we ever want to update the theme at
runtime.

Change-Id: Ie2b549e9af51d620801808c87d6f659cc7a06c04
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-11-08 17:58:49 +00:00
Thomas Hartmann
062512a246 QmlJSCheck: Adding more unsupported in designer types
Using initializer lists looks much better.

Change-Id: I314d846a9d383dbda432cd67010d79b492f40915
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-08 16:14:18 +00:00
Christian Kandeler
e3904d45fa Update qbs submodule
To HEAD of 1.6 branch.

Change-Id: Ia1ef808a80e36529cb81167acb8d3109f5f058ea
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-08 15:28:21 +00:00
Tobias Hunger
f33c6210cb CMake: Do not auto-run cmake if that was disabled
Do not run cmake on file changes if that was disabled in the CMakeTool.

Task-number: QTCREATORBUG-17232
Change-Id: I478161aebe353ddc47e24dd8a7f2cec54822e7d0
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-08 13:47:44 +00:00
Christian Stenger
c07c4eb068 AutoTest: Avoid concurrent access on static function members
First thread using the helper function initialized the list
object another thread accesses it afterwards. This could be
problematic under some circumstances.

Issue was detected using Helgrind.

Change-Id: I1520b1f7364742cb02630af1fd9d98960dec1f41
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-08 13:44:51 +00:00
David Schulz
2ccacf1fe6 Debugger: Fix potential memory leak
Change-Id: If22513704f72cc1f9802ece100cc1bf129e028c3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-08 12:33:29 +00:00
Tobias Hunger
156282a97f CMake: Use QT_INSTALL_PREFIX for CMAKE_PREFIX_PATH
QQT_INSTALL_LIBS does not work as intended. That was not obvious since
Qt Creatod adapts the PATH, which had a similar effect, but breaks when
trying to build the project outside Qt Creator.

Change-Id: I36c7caf69a157ae0d4e3dc500265042fd5964681
Reviewed-by: Florian Apolloner <florian@apolloner.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-08 12:08:36 +00:00
Tim Jenssen
724ce1ba0b space only changes
Change-Id: I21f86f9dd389597fe2f73179e32f46fa7114f590
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-08 11:18:52 +00:00
Ulf Hermann
bb40866217 Beautifier: Move initialization to extensionsInitialized()
Beautifier makes heavy use of mime types which shouldn't be accessed
in initialize() as that doubles the overhead for parsing them.

Change-Id: Ie731f1194f281e9574ef914d67537651658ea9e7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-08 11:04:01 +00:00
Ulf Hermann
608f647374 Register python editors icon overlay in extensionsInitialized()
Requesting mime types in initialized() is expensive because it causes
the mime database to be parsed. As additional mime types are added on
various plugin initializations, the database will be reparsed later
anyway. It's better to request the mime types afterwards.

Change-Id: I6c5f67a4483a693b2f69beb300b8014522fa2678
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-08 11:03:53 +00:00
BogDan Vatra
de687f5f9e Fix AndroidRunner
"m_tries" and "m_wasStarted" must be initialized before "m_psProc-
>start" call, because m_psProc will emit "QIODevice::readyRead" signal
before the function ends.

Change-Id: I10c63ca2d15c362d6df04018757b1916b9989893
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-11-08 10:03:00 +00:00
Tobias Hunger
9073a6419a CMake: Clear buildsystem related tasks before starting a new parser run
This prevents stale tasks from piling up in the issues pane.

Change-Id: I90f79e969b8929e5bb43e3964c01fcd10af2ea33
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-07 21:16:56 +00:00
Tobias Hunger
6b469e81e8 ProjectExplorer: Never delete base node when building a tree
Never delete the base folder node when using buildTree to set up
a tree of files in the project tree. This makes sure the node stays
around, even when it turns empty. This matches how buildTree is used
in our code.

Change-Id: Id2a589985d9ac704316db5f210232532dcdb5d58
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-07 21:16:25 +00:00
Frank Meerkoetter
e3b38b8a34 Fix dead stores in the debugger plugin
Found via the clang-static-analyzer

Change-Id: Ic461a8c369bef60081f7c2dfd9d6a778c64dbda0
Reviewed-by: hjk <hjk@qt.io>
2016-11-07 16:56:47 +00:00
Christian Stenger
3893ffa039 AutoTest: Speed up parsing for tests
Initial parsing for tests when opening bigger projects was too
slow. Try to let the parsing process on more than one file at
a time to speed up the whole process.

Project       before       now
qtbase        ~11min       ~4min
qtcreator     ~2min        ~40s

Values above may vary depending on the underlying hardware.

Change-Id: I77eeb189c82c58fce84ffbac67143ec7fa0adcae
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-07 13:46:12 +00:00
Tobias Hunger
abf84c3252 Qt: Handle absolute paths to mkspecs
Handle absolute paths to mkspec and do not accept any directory
as a mkspec: Only accept directories containing a qmake.conf.

Task-number: QTCREATORBUG-17237
Change-Id: I18c2b28a0abc525721df7c4f1ac2d272ca4cadb1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-07 13:26:04 +00:00
Tobias Hunger
a7f237d17b CMake: Make future-handling in ServerModeReader more robust
Change-Id: Id2fc5487fdfb7619db2eee2439e5636afdc39add
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-07 13:25:39 +00:00
Nikolai Kosjar
128d4cc580 Clang: Bring back warning/errors icons for qbs build
Broke with

    commit 9d9f003e0f
    Clang: Distinct warning/error icons

Change-Id: I90694ba8467ff1a4c1dcaab00bf566f4822f962f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-07 12:43:08 +00:00
Ulf Hermann
cfe06a8132 Timeline: Drop manual control of scale updates
The assumption that the scale entries only have to be updated when
their stable index changes was wrong. The repeater can shuffle around,
stash and restore items at will. It might restore some item at the
same position, but the timestamp it refers to might have changed. Thus,
the value being displayed was wrong until the timeline got scrolled.

By using a proper binding we avoid this. In turn the blockStartTime
might get re-evaluated twice for a single update to row.firstBlock.
That would be bad as we would constantly re-render all the texts.
Experiments show that the current implementation of the QML engine
happens to order the bindings in a way where this doesn't happen and
we cannot get better than this without huge overhead.

Also, we simplify some of the expressions involved.

Change-Id: I93848f89bdbefd28c3dbf30f13551c9476dabd37
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-11-07 12:25:55 +00:00
Christian Stenger
9050f19046 AutoTest: Re-use snapshot instead of fetching it while visiting
Change-Id: Ia41da67cb1fa047473b84baebafdbcaf6586c7ae
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-11-07 12:05:27 +00:00
Tobias Hunger
bc14dc223f SVN: Escape files containing '@' characters
Append a '@' to files with a '@' in their name. The last '@' (and
everything following it) is cut off by SVN and treated as a revision.

Task-number: QTCREATORBUG-17229
Change-Id: Icab62345c18277c0327b1e548a45feda0906b3c3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-07 11:24:15 +00:00
Christian Kandeler
0dc87382e9 QbsProjectManager: Translate qbs module properties to compiler flags
Workaround for this not being available via dedicated qbs properties
right now.

Task-number: QTCREATORBUG-17207
Change-Id: Id06a41edf0308e5b20dd6bc7aa390c18d75acb19
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-11-07 11:04:35 +00:00
Thomas Hartmann
50c63a78b8 QmlDesigner: Avoid unnecessary updated of item library model
We call delayedUpdateModel() instead of updateModel() setItemLibraryInfo(),
to avoid a second update. The updateModel in updateImports() is not required,
since we call setItemLibraryInfo().

Change-Id: I2fbb4f9d0cd467776141ae4d0c8aaecb00f55557
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-07 10:29:01 +00:00
David Schulz
8736565c14 Debugger: Adjust to latest field changes
Change-Id: Ic4b3c8f0670a0d58e3d762ff0765862709901d2a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-07 09:57:05 +00:00
David Schulz
df35444e8d Debugger: Add helper function for value creation
Change-Id: Ibdf496e5d6f6772d5c9fd831b8c66823c7ba8e72
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-07 09:56:54 +00:00
David Schulz
c44b30c391 Debugger: Return None type instead NULL
Always return a None type in the cdb python interface.
Returning Null will result in an exception whereas a None type
prints a stack as soon as a function or member from the return
value is used.

Change-Id: Idc4ea8547074e73ea17fb14f8e3793c0821cc526
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-07 08:40:02 +00:00
hjk
d6fff07de8 Debugger: Streamline common options page setup
A preliminary step to debugger options reorganization.

Change-Id: Iac77d87acfe246eff3f5734bcf35e35c2d6909c1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-07 08:39:46 +00:00
Christian Stenger
b171f3dfbc AutoTest: Ensure that testrunner can always return to not running state
Task-number: QTCREATORBUG-17226
Change-Id: I3ebba229ad8df4d59b550f7be3305bb8f14fb8b2
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-04 13:57:05 +00:00
Tobias Hunger
c286d16c00 CMake: Scan cmake tree for files
CMake is pretty poor with the data on which files are contained in a project.
Run a filesystem scan of the project directory to find more files.

Change-Id: I9cc3293a9faf9a967efa5f586c144c3e7773588b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-04 13:31:12 +00:00
Eike Ziller
261cfb1c98 Merge remote-tracking branch 'origin/4.1' into 4.2
Change-Id: Id15e2daa69c5f149c7aeafba1c212cfbd766e12c
2016-11-04 14:13:02 +01:00
Thomas Hartmann
2524a14660 QmlDesigner: Use original modifier for auto completion
We have to forward the call to the original modifier.
Without this patch auto completion does not work inside components.

Change-Id: Ic5798b3e853787da03d6ea1562e0d80ce0cc3bcc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-04 12:56:57 +00:00
Thomas Hartmann
1e5706c085 QmlDesigner: Fixing warning
Change-Id: Ia1c57252adac80f4f6ff1599b606c7a8588aed14
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-04 12:56:52 +00:00
Nikolai Kosjar
624bfeb70b C++: Remove concurrent access to TemplateNameId
The modification of the TemplateNameId changed "global state" because
the TemplateNameId is potentially accessed by multiple threads doing
lookup (access to same document and thus same symbol names).

Depending on the thread scheduling and access to
ClassOrNamespace::_specializations, the changed TemplateNameId
"suddenly" led to inconsistent results of TemplateNameId::Compare and
thus broke the std::map assertions.

Get rid of the const_cast, the setter and simply construct a temporary
TemplateNameId with isSpecializaton = true.

Task-number: QTCREATORBUG-14911
Change-Id: Ie381d132cc0d06af351ace4257773637d1ebee4e
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-04 11:45:33 +00:00
Thomas Hartmann
6494278d70 QmlDesigner: Fixing raise condition in the drag tool
We only skip the update, if the instance already has a valid parent
and the form editor is currently bypassing the puppet to handle
parent changes.

This avoids the form editor getting into an invalid state if this event is
handled (too) late.

Change-Id: I518b0f5a402a3ae55320028cfeb2d47f12418e38
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-04 10:42:03 +00:00
Tobias Hunger
4c3885a584 CMake: Polish TeaLeafReader
Change-Id: If379e1d53f2da61dccb1e72ea1a516e3bd788b60
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-04 10:21:29 +00:00
Tobias Hunger
69b378eb73 ProjectExplorer: Expose sortByPath operator on project nodes
This is universally useful, so expose it.

Change-Id: I9cceee076397c7d690d8d34ef8ac815059e4454d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-04 10:20:56 +00:00
Tobias Hunger
fdfe55c992 ProjectExplorer: Make NodeType const in Node class
Change-Id: I04b31f73a76ce47dc53e8cffd7ea0cbe7c8e4e08
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-04 10:20:36 +00:00
Tobias Hunger
5d66526910 SDKTool: Remove debug code
Change-Id: I9aa2e3deb924a60de013fb648d59807ebd1f0bb0
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-04 10:20:19 +00:00
Tobias Hunger
708cb1301f CMake: Do not warn about UNINITIALIZED variables
This so called type is not documented to exist but apparently widely used.

Change-Id: I0a7693e19874887a6e7260964d119d204e5be1ec
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-04 10:19:30 +00:00
Thomas Hartmann
4d8c8d016a QmlDesigner: indent only the component
If we indent lines that are also part of the surrounding component,
the offsets of the component become invalid. This was crashing.

Change-Id: I80f16c916fabd5b49a0d8ba87989c86727c97c50
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-04 10:15:28 +00:00
Jarek Kobus
05747d7d33 Don't shout in text messages
Change-Id: Ie8d2c6761c87b358f0bc8691e529ba8144e267a4
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-11-04 09:51:29 +00:00
Ulf Hermann
d771ba8921 Debugger: Don't clear unrelated views when updating locals
If the list of partial expressions is empty we need to tell the watch
handler that we are only updating the locals view, not e.g. the
inspector view.

Change-Id: Iedc74ffc66a8435faa272d053849b831f6b8cbbe
Task-number: QTCREATORBUG-16692
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2016-11-04 09:35:10 +00:00
Jarek Kobus
d8c6b2d434 Clarify comments on linguist file types
Change-Id: Iefe9238f7ae5d3646017918a3efdd84864800881
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-04 08:53:48 +00:00
Leena Miettinen
8ab3d91afd QML JS: Add missing space in UI text
Change-Id: I25e525216bb6ad07c5491c7e9660c7d9becad1d4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-04 08:36:10 +00:00
Jarek Kobus
0ed954ca76 Use tr for plurals
Change-Id: I22e7cd13a8bd20789e83945d99d5d57fd1eee392
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-04 08:28:58 +00:00
Jarek Kobus
8ed09cfa8e Fix apparent typo
Change-Id: Idd9b4a708aa8aa966da4d920b17d81c08f4d722b
Reviewed-by: hjk <hjk@qt.io>
2016-11-03 19:03:42 +00:00
Alessandro Portale
c110eac3ec ProjectExplorer: Introduce a small device status icon
Device status overlay and the device status display should be two
separate icons. This change makes it happen.

Change-Id: I3a965fdb8b74c447a5cf80e4c90a3ae06c91b3bc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-03 17:08:39 +00:00
Tobias Hunger
7150c0778b ProjectExplorer: Allow for disabled nodes in the project tree
Change-Id: I82d8284777f5691eb3ba9cf4ef92da05057aac18
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-03 15:56:16 +00:00
Tobias Hunger
ce3e586198 ProjectExplorer: Shorten space needed to store a FileType
Use class enum to shorten the FileType to quint16. This frees up a couple
of bytes per FileNode and we can have many of those.

Change-Id: I3a9ae25059690fefa15305a4268269647d6dc1c9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-03 15:55:39 +00:00
Tobias Hunger
c9ee7ee378 ProjectExplorer: Shorten NodeType enum
Use a class enum with a type quint16 for the NodeType. Frees 2 bytes
per node that can be used for better things now.

Change-Id: Ib84bf8629e9f4a5fb0793355eff0f0d6302167dd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-03 15:55:13 +00:00