Commit Graph

24 Commits

Author SHA1 Message Date
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
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>
2022-10-07 13:47:53 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
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>
2022-08-26 12:27:18 +00:00
Alessandro Portale
da446d0d15 MarketPlace: Use HighDpi resolution for thumbnails
Let's create the thumbnail in the highest possible resolution for better
visual quality.

Change-Id: I35f67829ed6232cd3a139161e5695661b3adf271
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-25 09:30:19 +00:00
hjk
9e363c6421 Add plugintr.h files to all plugins
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>
2022-06-27 13:34:57 +00:00
Robert Löhning
0fa5303916 Welcome: Replace search term when adding tags
Currently, both are mixed into one so neither of them works. When both
are separated with a space, the search term is ignored anyway so it's
better to just remove it.

Change-Id: I449b5d80dc50620f13f37c908e63877eb63b3c26
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-03 20:04:20 +00:00
Eike Ziller
9d8a419d10 Remove qmake build files
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>
2022-01-20 12:18:15 +00:00
Alessandro Portale
196aee97b1 Welcome: Unify design with Qt Design Studio
This applies the design of the new Welcome Screen for the Qt Design
Studio to the Welcome Screen of Qt Creator.

Change-Id: Id63283da1db43ac1036d371694cc2ea4a6de8d8c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-14 12:12:21 +00:00
hjk
104ea4accc Make some qHash and comparison operators overloads hidden friends
Restricts lookup scope more to necessary bits.

Change-Id: Ia42c95aaa70534843b7f6a90bfc56d2a1202c612
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-06 17:10:49 +00:00
Alessandro Portale
37e118b5ec Core: Base GridView on QListView (instead of on QTableView)
Use QListView with its very capable icon view mode instead of QTableView
in order to layout items in a grid.

This removes the need for the GridProxyModel.
It also leaves the previously self-implemented calculation of columns
count to QListView. Only the ProductGridView still needs to calculate
that.

Change-Id: If6e7f033fc78883930794c1e261aea396ae25190
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-11-29 19:09:58 +00:00
Jarek Kobus
cf010911f7 Don't allocate unneeded temporary containers
Fix clazy warnings: allocating an unneeded temporary container
[clazy-container-anti-pattern]

Change-Id: I4b4c2c634eea650bbdf3c12d982a17f899fc94ec
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-12-14 12:35:47 +00:00
Jarek Kobus
eede69e313 Don't create a temporary list of values for qDeleteAll
It's enough to pass QHash as an input for qDeleteAll,
it will delete all values and won't touch keys.

Change-Id: I5a924f4d59787ac3fd1ffaf07709ab91ba96c7c6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-17 06:29:14 +00:00
Alessandro Portale
b5e9dd006a Marketplace: Implement a little optimization
Should have been done in a previous commit.

Amends: b77318cb74

Change-Id: Ic3800ca6b6a4e799a5545aa9c68d9f7f7ccfcb20
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-28 12:39:56 +00:00
Alessandro Portale
b77318cb74 WelcomeScreen: Don't rely on image format auto-detection
The examples and marketplace pages show images that are decoded from
data buffers. This happened without specifying the encoding format,
which triggers image auto-detection.

The negligible overhead of the auto-detection is usually not a problem,
but the probing of image QImageIOHandlers that goes along with auto-
detection can emit warnings. A concrete example is a warning in the TGA
plugin which was added in Qt 5.15.1.

Task-number: QTCREATORBUG-24853
Change-Id: I596604bde7621acf92e825f45e0c23ac4e90b78d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-27 16:15:10 +00:00
hjk
430a33dcd9 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-06 06:07:13 +00:00
Christian Kandeler
fb13a124c1 Marketplace: Fix leak
Change-Id: Ifd31a38514a630e9b8e36d4255dc4de6d6588925
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-17 11:33:29 +00:00
Christian Stenger
eac5bc2a06 Marketplace: Do not use dynamic_cast
Amends c3946529ca.

Change-Id: If66ce3169dd1c61334a26f5532866dda9b0338a9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-15 12:09:31 +00:00
Christian Stenger
135f2cf7cf Marketplace: Fix missing include
Amends c3946529ca.

Change-Id: If296e108315f7120b34895bf5d9aabdf173b54ef
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-14 14:05:36 +00:00
Christian Stenger
c3946529ca Marketplace: Use sections to display products
Fixes: QTCREATORBUG-23808
Change-Id: I2f69697c6ab2133ccf4567bf8f5185bac34a86c7
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-14 13:16:49 +00:00
Eike Ziller
20ef5c6de3 Merge remote-tracking branch 'origin/4.12'
Change-Id: Ibbf9f16677a58bdcdd3ce63701ffa34db6f44916
2020-05-11 11:36:22 +02:00
Christian Stenger
a35b0858fb Marketplace: Hide progress indicator on error
This avoids appearing as there is still something happening.

Change-Id: I34c34e054a5454d1030234f482630e3d3fdd5a72
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-07 05:04:58 +00:00
Christian Stenger
1cb8f525ea Marketplace: Disable videos from marketplace
They are no real products.

Change-Id: I534a1be922a9f0aa8e603ebbcb1bc01357c16bdd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-05-07 05:04:22 +00:00
hjk
299d34d547 Remove apparently unneeded QtPlugin includes
Change-Id: I511c0318a72dbf2a92e4749dee02eabfc9826139
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-12 16:03:37 +00:00
hjk
a44bfdd779 Provide an empty default IPlugin::extensionsInitialized()
And remove all empy re-implementations.

Change-Id: I19f0b4e55c042c96693ecb89766f97f0a97b54ae
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-07 10:21:34 +00:00
Christian Stenger
bf7b16d9ca Add Qt Marketplace plugin
Provides a simple integration into the welcome page.

Task-number: QTCREATORBUG-23452
Change-Id: I3e615dcd6dfd9e401159ea6d30b48737edb1e1f9
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-01-23 14:29:36 +00:00