In favor of the FilePath/Link ones.
Change-Id: I5caf9e0f8de304ff4ee12329557aa50a6f3a0c69
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Don't compare int with QString - which even compiles with Qt 5 (but
luckily doesn't with Qt 6).
Amends 123133841e
Change-Id: I347568c89658896a2e094610dbf1700ff84d81c5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Only show the panel if an error occurs, or if the user opted to have the
paste link shown to him.
Task-number: QTCREATORBUG-24430
Change-Id: Ie474acbe2b4d3b6d3332111bdd7ae18b16bd8618
Reviewed-by: hjk <hjk@qt.io>
The coreplugin/id.h header is kept for downstream for now.
Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The pastecode.xyz service has apparently ceased to exist.
Fixes: QTCREATORBUG-24002
Change-Id: I95fe6ec1388558d4dc176f66b166026619414e89
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Let the user decide whether their pasted content is public. Default is
non-public, for safety reasons.
Task-number: QTCREATORBUG-23972
Change-Id: I5be444807d3f2cb41c629825715f0eaaa50d34c7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
There is no official API anymore after the latest change of
the KDE paster and it was probably almost no more in use
after the need for credentials.
Remove everything related except the base implementation
of the sticky notes part as it could be re-used for another
paster that based on the old approach used by the KDE paster.
Change-Id: I0e2c3f279bc9eaa373147ee2909c9538f0d62498
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Our users are running out of choices for code pasting: KDE has required
an account for quite a while now, and pastebin.ca appears to be offline,
leaving them only with the ad-heavy pastebin.com.
Therefore, we add support for a new site: pastecode.xyz seems
responsive enough, has a simple API and has been around for a bit.
[ChangeLog] Added support for the pastecode.xyz code pasting service
Change-Id: I9b622853df24c28d65c6e388f953c82fc5380fae
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Q*Application classes have unusually many static functions. In many
cases in our code, these functions are unnecessarily called as instance
functions, using the qApp helper.
This patch replaces many occurencies of qApp with the according
Q*Application classname.
Change-Id: I6099a419fa7bf969891269c37ed7a9e817ef5124
Reviewed-by: hjk <hjk@qt.io>
To avoid repeating the 'MimeDatabase mdb; mdb.something(); ' mantra
all over the place.
Change-Id: I4bfef62e73275a991455141671d6071162788e9d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Both wrap the corresponding Qt class, but make sure all temporary files
or directories are created inside a "master temporary directory".
Change-Id: I55461be507c828c965224c02863ea5ed9bbf9498
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
I broke some connects today, fix them by turning them into
Qt5 style connects.
Change-Id: I5aab2afcebbef5a5f36840352598c747d5d60477
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Use Q_DECLARE_INTERFACE et al.
This provides a way to have the dependency on code pasting
optional in the using plugins (VCS, diff editor), while
still being able to use a nice API to perform the pasting itself.
Change-Id: Ia61e0066d552e45031f4aa7fd1f6693b68f92384
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
If a document has a file name associated with it then the prefix is
composed from path components (subdirectories), starting from the one
where the file is located and going up the parents until the resulting
name becomes unique among other open documents.
If a document doesn't have an associated file name, then a sequential
number (starting from 1) is appended to the display name of the
document.
This feature is useful when working with big projects that have lots
of idendical file names across different subdirectories (e.g.
Makefile.in, main.cpp, etc.) that need to be edited at the same
time. It allows to easily recognize such a file when switching
between documents in the editor, w/o the need to place the
mouse pointer over the name entry to get its full path.
Started-by: Dmitriy Kuminov <coding@dmik.org>
Task-number: QTCREATORBUG-10185
Change-Id: I633ea6d9b9b4fce8b67335dbcce1bda29254efde
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
... and default to C_GLOBAL. A rather common case.
Similar for ActionContainer::addSeparator().
Change-Id: I7f9ba573af201c0a472132d5a494ad17cc4175b7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@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: I919da493d0629b719d328e5e71c96a29d230dfd1
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Internal paths are supposed to be normalized
Change-Id: Ic6943ce13ad389dfdb44054a9e6f03da8c6cd88d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Remove the "Paste from clipboard" action and move the functionality
into "Paste Snippet". Introduce a new overload for post() taking
a flag mask specifying the sources and use this for the
CodePasterService class (used by the diff editor).
Task-number: QTCREATORBUG-13401
Change-Id: Iadc3560a8a3bdaa817bc4a86007c2682feeb4b77
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Add property "plainText" to DiffEditorDocument which
is queried as last resort by the code paster.
Task-number: QTCREATORBUG-12546
Task-number: QTCREATORBUG-9669
Change-Id: Iea9cd0d296bcc8e8a7300072c1a4a9068c2ab102
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
First step of some more 'Base' removal in TextEditor.
s/Core::TextDocument/Core::BaseTextDocument/
s/TextEditor::BaseTextDocument/TextEditor::TextDocument/
Change-Id: I71ba325a2f0ad72ec9dae0d96846cbae72d326f7
Reviewed-by: hjk <hjk121@nokiamail.com>
Remove usage of the Q_EXPORT_PLUGIN macros, which do not exist in Qt 5.
Change-Id: I678c3cf10b9c5d5c1b9f252b0ecd1c97dc810a47
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
That was the only user of that layer of abstraction.
Change-Id: I2bdc4abb8b2b33bfb70398dd11f7ecc4745ddc43
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Try to obtain text via ITextEditorDocument.
Task-number: QTCREATORBUG-9669
Change-Id: Ie3816d84ea715691256f757fdd9a7b666fb6c27c
Reviewed-by: Eike Ziller <eike.ziller@digia.com>