When we get fine-grained scroll events we shouldn't zoom 10% on every
event but scale zooming so they add up to 10% for every wheel click.
Task-number: QTBUG-49024
Change-Id: I08ac728bf1421148680de8fbbc76054ba2cce884
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This enables macros in snippets as well as if/else to select/deselect
lines to have in the snippet.
Change-Id: Ic88fb3277a0f5ac803bcab486b245c688c00822a
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
The tool tip never has focus, so it cannot become the IContext that is
checked for context help. So, integrate the help id into Utils::ToolTip
and check the tool tip first when checking for context help.
As a side effect the [F1] button and help id for the tool tip is now also
available for use outside of the text editors.
Task-number: QTCREATORBUG-5345
Change-Id: Id975703caf161d1183c247e8ad8bb693b90fd306
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Fixes building up of sluggishness when hovering text while keeping
Ctrl pressed.
To make sure link clicks are handled correctly, an immediate update
is forced in case of mouse press.
Task-number: QTCREATORBUG-12573
Task-number: QTCREATORBUG-9008
Change-Id: Ieb85d9f2a1e82167dd9a9245e4bc48766d71ae93
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Made indentation work for block selection mode the same way it does in default mode:
1. delete text if any selected
2. indent block if no text selected
3. indent last line if cursor in first column (QTCREATORBUG-12697)
Task-number: QTCREATORBUG-12697
Change-Id: I1f6b218b389f3fdc5232ec02857aa76f5ccbaaf0
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Fixes case 2 and 3 of QTCREATORBUG-14633.
Task-number: QTCREATORBUG-14633
Change-Id: I19bf3c81c26f8a89a508591b0e7264251e0e6254
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
... by using Core::Ids instead of ExtraSelectionKind enum.
Change-Id: I664ff2a4a03eddd8fe1150929203a1727c12dc84
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Extend drop support with variant values. A drop may be a file drop or a
value drop or both.
Rename Utils::FileDropSupport to Utils::DropSupport and add methods to
add not only files but any QVariant value to the mime data. Project
explorer adds dragged nodes (which will be needed for future ModelEditor
plugin).
Change-Id: I799542c60fdecb3e64af0d3ba47b6caa9adbcfd7
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
For non-editor documents it currently is not used, but for editors it
makes more sense to have that on the document instead of the editor.
Most actual implementations of "open" were done in the documents already
anyhow, because it is needed for reloading.
Change-Id: I29d4df2078995cbe80172b51a9bebeecb3afad3c
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
To allow invoking it from BaseTextFind.
Task-number: QTCREATORBUG-14300
Change-Id: Id9f553d166f7b929e00238327e22d6a915957b77
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reducing the number of calls to findLinkAt() when hovering over
text.
Task-number: QTCREATORBUG-12573
Change-Id: I679ee7d9599071e1e3ea20cc028440df6dad0d25
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
... that are currently visible on the screen.
Change-Id: I6c56f376f1a34a7314584df057cf03a8e5387a08
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This avoids unnecessary detaches of the Qt container data.
The mismatches where detected by defining QT_STRICT_ITERATORS;
however, this define violates the ODR (causing linker errors),
and therefore is not added permanently.
Change-Id: Idd336a9c8b394214a820437ef1b92d2101f6101c
GPush-Base: 62b0848b9c
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Following 73616849, it is dangerous to store a reference to the rvalue of
toString(), since it might become dangling.
Example:
FileName foo() { return FileName::fromString(QLatin1String("/some/file")); }
void func()
{
const QString &fileName = foo().toString();
// fileName is now a dangling reference
}
Change-Id: I5dfad5dc8dd568a0a3c8f9f71ad93292dc26cbbe
Reviewed-by: hjk <hjk@theqtcompany.com>
PageIds are supposed to be unique, so the CategoryId can be determined
from the PageId. Look for PageIds in the already expanded categories
first before searching through expensive categories.
Change-Id: I006beb0df6183453163ac1810fe59a306a0f52b1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
No longer uses artificial mime types for highlighting files that do not
specify a mime type. No longer registers mime types that are specified
but that Qt Creator does not know about.
Instead, try to match the mime type, and if that fails, or if the result
does not match the file name pattern, try to match file name patterns
instead.
This also fixes the potential problem that mime types were always only
added, never removed, even if the user removed definitions and triggered
a reparse.
Also fixes that a highlight definition in the fallback location could
overwrite a highlight definition in the preferred location, if it has a
higher priority setting.
Task-number: QTCREATORBUG-13912
Change-Id: I86ce10f4f4341f6add0d2b58a04f080501d0cbf4
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* configureMimeType -> configureGenericHighlighter, since that is what
it actually does.
* setupAsPlainEditor -> setupGenericHighlighter, since that is what it
actually does
* avoid multiple highlighting definition lookups
* unify code paths by not separately creating generic highlighters
through the factories
Change-Id: I9579ca5736bbf08c01b8e41b63c6b9f36bdc725e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
next if file =~ %r{src/shared/qbs|/qmljs/}
s = File.read(file)
s.scan(/^using namespace (.*);$/) {
ns = $1
t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
before = $1
char = $2
if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
m
else
before + char
end
}
if t != s
puts file
File.open(file, 'w').write(t)
end
}
}
Change-Id: Ief087658e2adc337ee02c49f0fb406597114df07
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
The newest kate definition files for cmake contain no mimetype for the
cmake definitions, which lead to us not finding the right definition.
Instead add a method to find the definition based on the name, which
is not as generic, but we know which one we want for cmake anyway.
Task-number: QTCREATORBUG-13588
Change-Id: Ib57fe531a225310c32ca1ef909a31bd7f52c612f
Reviewed-by: Guilhem Vallat <guilhem.vallat@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
There's a bit too much unneeded flexibility in there, requiring extra
boiler-plate code on the user side.
Change-Id: I34d03838fb1cd3182fcbb93bf65158ebfc7e2bce
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>