aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpaster
Commit message (Collapse)AuthorAgeFilesLines
* CPaster: Restore some more object namesRobert Löhning2022-10-172-0/+8
| | | | | Change-Id: I590baed6d2a2ea4a8dd56f471ac7d4d0a015c725 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Fix compiler warningsEike Ziller2022-10-131-2/+0
| | | | | | | | | | - private field 'm_postId' is not used - private field 'm_hostChecked' is not used - missing field 'AcrossEmptyLines' initializer Change-Id: I1e31c79e078bcb68d053202ad322299b92c4fa38 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-1/+1
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I88edd91395849574436299b8badda21bb93bea39 Reviewed-by: hjk <hjk@qt.io>
* CPaster: Convert to Tr::trhjk2022-09-3021-103/+95
| | | | | | Change-Id: I00242638e483aa9cb5b54473982eed137e859ff6 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Use SPDX license identifiersLucie Gérard2022-08-2630-720/+60
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CPaster: Replace deprecated codeChristian Stenger2022-08-043-4/+4
| | | | | Change-Id: I2c9ee3df6c4a8e91d5f3701655e10dc106697593 Reviewed-by: hjk <hjk@qt.io>
* CPaster: inline pasteselect.uihjk2022-07-285-182/+75
| | | | | | Change-Id: Icf9d7964b3b4d8e1d793e171b987af58b360c42c Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CPaster: remove unused pastebindotcomsettings.uihjk2022-07-273-95/+0
| | | | | Change-Id: I4870f468052ead995535e972101626ef28296366 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CPaster: Inline pasteview.uihjk2022-07-277-348/+158
| | | | | Change-Id: Ib09de9def992f9d564eaf6398627f2b5633dd629 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Utils: Introduce Layouting::{br,st}hjk2022-07-252-3/+3
| | | | | | | | | | | | | ... as "standard" ways to define line breaks and simple stretch. There have already been too many patterns to do it. Break() and Stretch() still work for the patches in flight, but they are planned to be removed. Change-Id: I9b70dcdc11244a904a496b0c55938dfb0b265fc8 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Core: Avoid #include of fileutils.h in icore.hhjk2022-07-221-6/+8
| | | | | | | | | filepath.h is sufficient. Change-Id: Ibd865020f7820a6c6478eca6cf7b8065cf8c8cf3 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Drop Qt5: Various plugins: Get rid of QOverloadJarek Kobus2022-07-202-3/+2
| | | | | Change-Id: I4913044f8897fd3449dbb537e4af6785eb3ad447 Reviewed-by: hjk <hjk@qt.io>
* Use setClipboardAndSelection more broadlyhjk2022-07-151-1/+3
| | | | | | | | Basically everywhere besides the EmacsKeys plugin. Change-Id: Iaf2a0a5d791b5b3dd6df2c05c1b862516630d3f8 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Utils: More porting.h related changeshjk2022-07-141-1/+0
| | | | | Change-Id: I528a6950dfa6e09eb7f7ada265c8c41dba816bfd Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Add plugintr.h files to all pluginshjk2022-06-271-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Except FakeVim, which had it before. for i in [a-eg-z]*/*.json ; do upper=${i##*/} upper=${upper/.json/} lower=${i%/*} trfile=$lower/${lower}tr.h cat << EOT > $lower/${lower}tr.h /**************************************************************************** ** ** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3 as published by the Free Software ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ****************************************************************************/ namespace $upper { struct Tr { Q_DECLARE_TR_FUNCTIONS($upper) }; } // namespace $upper EOT git add $trfile perl -pi -e "s/(${lower}_global.h)/\1\n ${lower}tr.h/" $lower/CMakeLists.txt perl -pi -e "s/(\"${lower}_global.h\",)/\1 \"${lower}tr.h\",/" $lower/$lower.qbs done Change-Id: I15ebbaaa9443c57b391b9e143f592d8a0c9208a9 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove or replace a few unnecessary #includeshjk2022-05-201-1/+1
| | | | | | Change-Id: I0545533baab57a4383fda5fd680603fdc6459a01 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix some warningsChristian Kandeler2022-04-011-3/+5
| | | | | | | Change-Id: Idc12465aa6a3a3d158f17961f902578ca16d0d7b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Rename 'output pane' to simply 'output'Thomas Hartmann2022-03-011-1/+1
| | | | | | | Change-Id: If45e053a32855bca68dc71cb5da22f981146e45b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Mimetypes: Make implementation switchable between new and oldEike Ziller2022-02-251-1/+1
| | | | | | | | | | | | | | | | | | - configure with QTC_USE_NEW_MIMEDATABASE to switch to the new one in utils/mimetypes2/ - added utils/mimeutils.h header for the Qt Creator specific static wrappers, that also includes the "public" headers for MimeType et al from the new or old implementation, depending on configuration - change all utils/mimetypes/ includes to utils/mimeutils.h - move the implementation for the wrappers to utils/mimetypes(2)/mimeutils.cpp - also move the MimeDatabase declaration in the "old" implementation back to utils/mimetypes/mimedatabase.h Change-Id: Ie8de229c035d6cd9a5e4739dc0fa78d9c17228e3 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Fix issues with showing code pasting URLEike Ziller2022-02-142-2/+2
| | | | | | | | | | | | | | | - use common signal for posting output for fileshare protocol, so it correctly behaves wrt the settings - flash even when not opening the output pane when showing the output - MessageManager::writeDisrupting should switch the output pane even if another output pane is currently open (which enforced with IOutputPane::WithFocus) Fixes: QTCREATORBUG-26975 Change-Id: I51586eaca826f81f7e72f147fce7e72cbf639c6c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Remove qmake build filesEike Ziller2022-01-203-72/+0
| | | | | | | | | | Removes qmake as a build system for building Qt Creator itself. Keep them for some tests that are not completely moved to CMake yet. Change-Id: I846c6ef65626b6dfae6375fdc85d00677aa8c2fb Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/6.0'Eike Ziller2022-01-142-6/+3
|\ | | | | | | Change-Id: Ia208fc746333e3d36868c580aa7794da9627c3e0
| * CPaster: Do not fail to paste after connection checkChristian Stenger2022-01-132-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | dpaste allows one request per second, but we perform a connection check before sending the paste request. This happens too fast and lets the paste fail for the first time. Skip the configuration check as the user gets an error message if it fails. Fixes: QTCREATORBUG-26717 Change-Id: I5661055c0d3ed0894db170c0570a7501af34214e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | CodePaster: Remove "make public" propertyChristian Kandeler2021-11-2417-82/+67
| | | | | | | | | | | | | | | | | | | | It's not functional in any of our implementations. Task-number: QTCREATORBUG-23972 Change-Id: I7c35b548e6069ff31e9a050752cd8267ce8ed7a8 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | EditorManager: Remove QString openEditor(At) overloadsEike Ziller2021-11-021-3/+3
|/ | | | | | | | 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>
* Merge CppTools into CppEditorChristian Kandeler2021-09-012-8/+8
| | | | | | | | | | | | | | | | There was no proper separation of responsibilities between these plugins. In particular, CppTools had lots of editor-related functionality, so it's not clear why it was separated out in the first place. In fact, for a lot of code, it seemed quite arbitrary where it was put (just one example: switchHeaderSource() was in CppTools, wheras switchDeclarationDefinition() was in CppEditor). Merging the plugins will enable us to get rid of various convoluted pseudo-abstractions that were only introduced to keep up the artificial separation. Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Fix lupdate issuesEike Ziller2021-07-091-1/+1
| | | | | | | | | Some tr functions missing, some places where we need full qualification because lupdate gets confused with namespaces. Change-Id: Ic1d6ef3b31960dda02bc0788a255857117acdca9 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Do not pass QStringView by const referenceKai Köhne2021-06-171-4/+4
| | | | | | | | | | That's what the documentation says: https://doc.qt.io/qt-6/qstringview.html#details Change-Id: I0b41fc4abad1601c0ed416a505534cf7ae7633e1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: filepathify fileutilsDavid Schulz2021-05-182-2/+2
| | | | | Change-Id: Ic9048369f64d793f5f567cdb0c715488fb5a4ff6 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* PasteSelectDialog: Fix after refactoringEike Ziller2021-04-143-7/+6
| | | | | | | | | | | Don't compare int with QString - which even compiles with Qt 5 (but luckily doesn't with Qt 6). Amends 123133841e7d5645fb236ef8bb3a33fccad6d450 Change-Id: I347568c89658896a2e094610dbf1700ff84d81c5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
* CodePaster: Some more settings page cleanuphjk2021-03-294-81/+34
| | | | | Change-Id: Ieac61eda5081025a3fe3cbbfffbd46d5433d0ebc Reviewed-by: David Schulz <david.schulz@qt.io>
* CPaster: Aspectify FileShareProtocolSettingshjk2021-03-258-232/+73
| | | | | Change-Id: I9ae9975eb6fd2c4124d17e2862afa9cde32e9438 Reviewed-by: David Schulz <david.schulz@qt.io>
* CPaster: Aspectify general settingshjk2021-03-2513-324/+141
| | | | | Change-Id: Ia0a24dd5fdc03217c54aee50ed1f39be0110a415 Reviewed-by: David Schulz <david.schulz@qt.io>
* Use invokeMethod instead of single shot timer with 0 timeoutJarek Kobus2021-01-291-2/+1
| | | | | | | Refactor it in coreplugin. Change-Id: I6aaad1b9270a8ff8a4a0bea6a1fff806b2fe190b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix build with Qt6Eike Ziller2021-01-211-1/+1
| | | | | | | | | Some type issues (int vs long long, int vs QFont::Weight), no "midRef" any more. Task-number: QTCREATORBUG-24098 Change-Id: Id39f70edc14832baaeebb2572bca5491deadaf1d Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* CPaster: Fix fetching from pastebinChristian Stenger2021-01-111-54/+130
| | | | | | | | | Parsing HTML with QXmlStreamReader is a bad idea as it may be malformed HTML. Replace XML parsing by using regular expressions. Change-Id: I230e9d2b8e13d8bd736cb3f05eb6de7f812aab5b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CPaster: Use new message manager APIEike Ziller2020-12-073-8/+12
| | | | | | | | | 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>
* Fix build issues with Qt6Eike Ziller2020-09-182-4/+5
| | | | | | | | Change from QStringRef to QStringView at various places. Task-number: QTCREATORBUG-24098 Change-Id: Ia7a634fa26464fbb2962724d5f0e188cecc68801 Reviewed-by: hjk <hjk@qt.io>
* CPaster: Make dpaste use SSL permanentChristian Stenger2020-08-101-1/+1
| | | | | Change-Id: I8c3238c2efcfac1e1a4cf718e09a2f862be85b9b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CPaster: Inform about a permanent redirectChristian Stenger2020-07-231-1/+6
| | | | | | | | Helps to keep track of the current workaround and replace it again with using the updated URL on a permanent move. Change-Id: I913dbd7be18d77c9a8d52f1dd931cc5b30320fa2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CPaster: Fix fetching from DPasteChristian Stenger2020-07-232-11/+29
| | | | | | | Currently the fetch location has moved. Change-Id: Ie4cd3bf4b1050ca2c0cc17bde553f546232882e7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Core/Utils: Migrate further to Utils::Idhjk2020-07-061-1/+0
| | | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 (cherry picked from commit 430a33dcd9ac80ddb848e41f8f059102857c88aa) Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Use dialogParent() instead of mainWindow()Eike Ziller2020-06-021-2/+2
| | | | | | | | | | There are very few reasons to use mainWindow() directly. Especially for modal dialogs, using dialogParent() is important, since that guarantees the stacking order in case of other dialogs currently being open. Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6 Reviewed-by: hjk <hjk@qt.io>
* CPaster: Replace pastecode.xyz with dpaste.comChristian Kandeler2020-05-1810-86/+64
| | | | | | | | The pastecode.xyz service has apparently ceased to exist. Fixes: QTCREATORBUG-24002 Change-Id: I95fe6ec1388558d4dc176f66b166026619414e89 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CodePaster: Expose privacy settingChristian Kandeler2020-05-0519-39/+108
| | | | | | | | | | 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>
* Utils: Replace FileChooser::path() by filePath().toString()hjk2020-04-091-1/+1
| | | | | | | | | | | Keep the old method for now to ease downstream porting. The change is kept mechanical, there's a lot of cleanup possible now on the user code side. Change-Id: I936baedd45b7ba057f1c789a1bec896886f48eff Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Fix lupdate issuesEike Ziller2020-03-181-0/+1
| | | | | Change-Id: I26f08ae82354c178f6d26f9138796328b50bfba8 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Provide an empty default IPlugin::extensionsInitialized()hjk2020-02-071-1/+0
| | | | | | | And remove all empy re-implementations. Change-Id: I19f0b4e55c042c96693ecb89766f97f0a97b54ae Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CPaster: Pimpl pluginhjk2020-01-274-139/+129
| | | | | Change-Id: I595222c374be30bfc3f32897a6096a528188cfc5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPaster: Fix memory leakChristian Kandeler2020-01-221-0/+1
| | | | | Change-Id: Ic17619074966f6a84dd0fd66579102289a48adf4 Reviewed-by: hjk <hjk@qt.io>