2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2008-12-02 16:19:05 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#include "profileeditor.h"
|
2008-12-02 16:19:05 +01:00
|
|
|
|
2014-08-20 14:43:06 +02:00
|
|
|
#include "profilecompletionassist.h"
|
2008-12-02 12:01:29 +01:00
|
|
|
#include "profilehighlighter.h"
|
2014-09-30 13:08:05 +02:00
|
|
|
#include "profilehoverhandler.h"
|
2019-03-19 16:03:36 +01:00
|
|
|
#include "qmakenodes.h"
|
|
|
|
|
#include "qmakeproject.h"
|
2013-10-16 12:10:22 +02:00
|
|
|
#include "qmakeprojectmanagerconstants.h"
|
2013-08-30 12:55:06 +02:00
|
|
|
|
|
|
|
|
#include <extensionsystem/pluginmanager.h>
|
2014-08-20 14:43:06 +02:00
|
|
|
#include <qtsupport/qtsupportconstants.h>
|
2020-03-03 14:57:21 +01:00
|
|
|
#include <projectexplorer/buildconfiguration.h>
|
2016-04-22 15:42:30 +02:00
|
|
|
#include <projectexplorer/projectexplorerconstants.h>
|
2019-10-25 09:55:32 +02:00
|
|
|
#include <projectexplorer/target.h>
|
2019-03-19 16:03:36 +01:00
|
|
|
#include <projectexplorer/session.h>
|
2014-08-20 14:43:06 +02:00
|
|
|
#include <texteditor/texteditoractionhandler.h>
|
2015-02-26 13:22:35 +01:00
|
|
|
#include <texteditor/textdocument.h>
|
2022-05-31 11:16:44 +02:00
|
|
|
#include <utils/fsengine/fileiconprovider.h>
|
2014-08-20 15:14:35 +02:00
|
|
|
#include <utils/qtcassert.h>
|
Implement theming for QtCreator
Adds a 'Theme' tab to the environment settings and a '-theme' command
line option.
A theme is a combination of colors, gradients, flags and style
information.
There are two themes:
- 'default': preserves the current default look
- 'dark': uses a more flat for many widgets, dark color theme
for everything
This does not use a stylesheet (too limited), but rather sets
the palette via C++ and modifies drawing behavior.
Overall, the look is more flat (removed some gradients and bevels).
Tested on Ubuntu 14.04 using Qt 5.4 and running on a KDE
Desktop (Oxygen base style).
For a screenshot, see
https://gist.github.com/thorbenk/5ab06bea726de0aa7473
Changes:
- Introduce class Theme, defining the interface how to access theme
specific settings. The class reads a .creatortheme file (INI file, via
QSettings)
- Define named colors in the [Palette] section
(see dark.creatortheme for example usage)
- Use either named colors of AARRGGBB (hex) in the [Colors]
section
- A file ending with .creatortheme may be supplied
to the '-theme' command line option
- A global Theme instance can be accessed via creatorTheme()
- Query colors, gradients, icons and flags from the theme
were possible (TODO: use this in more places...)
- There are very many color roles. It seems better to me
to describe the role clearly, and then to consolidate later
in the actual theme by assigning the same color.
For example, one can set the text color of the output pane button
individualy.
- Many elements are also drawn differently.
For the dark theme, I wanted to have a flatter look.
- Introduce Theme::WidgetStyle enum, for now {Original, Flat}.
- The theme specifies which kind of widget style it wants.
- The drawing code queries the theme's style flag and
switches between the original, gradient based look and
the new, flat look.
- Create some custom icons which look better on dark background
(wip, currently folder/file icons)
- Let ManhattanStyle draw some elements for non-panelwidgets, too
(open/close arrows in QTreeView, custom folder/file icons)
- For the welcomescreen, pass the WelcomeTheme class.
WelcomeTheme exposes theme colors as Q_PROPERTY accessible from
.qml
- Themes can be modified via the 'Themes' tab in the environment
settings.
TODO:
* Unify image handling
* Avoid style name references
* Fix gradients
Change-Id: I92c2050ab0fb327649ea1eff4adec973d2073944
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-10-14 19:09:48 +02:00
|
|
|
#include <utils/theme/theme.h>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2014-08-20 14:43:06 +02:00
|
|
|
#include <QCoreApplication>
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QFileInfo>
|
|
|
|
|
#include <QDir>
|
2013-03-28 09:01:07 +01:00
|
|
|
#include <QTextBlock>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2017-09-20 17:42:28 +02:00
|
|
|
#include <algorithm>
|
|
|
|
|
|
2019-03-19 16:03:36 +01:00
|
|
|
using namespace ProjectExplorer;
|
2014-08-22 17:40:24 +02:00
|
|
|
using namespace TextEditor;
|
Implement theming for QtCreator
Adds a 'Theme' tab to the environment settings and a '-theme' command
line option.
A theme is a combination of colors, gradients, flags and style
information.
There are two themes:
- 'default': preserves the current default look
- 'dark': uses a more flat for many widgets, dark color theme
for everything
This does not use a stylesheet (too limited), but rather sets
the palette via C++ and modifies drawing behavior.
Overall, the look is more flat (removed some gradients and bevels).
Tested on Ubuntu 14.04 using Qt 5.4 and running on a KDE
Desktop (Oxygen base style).
For a screenshot, see
https://gist.github.com/thorbenk/5ab06bea726de0aa7473
Changes:
- Introduce class Theme, defining the interface how to access theme
specific settings. The class reads a .creatortheme file (INI file, via
QSettings)
- Define named colors in the [Palette] section
(see dark.creatortheme for example usage)
- Use either named colors of AARRGGBB (hex) in the [Colors]
section
- A file ending with .creatortheme may be supplied
to the '-theme' command line option
- A global Theme instance can be accessed via creatorTheme()
- Query colors, gradients, icons and flags from the theme
were possible (TODO: use this in more places...)
- There are very many color roles. It seems better to me
to describe the role clearly, and then to consolidate later
in the actual theme by assigning the same color.
For example, one can set the text color of the output pane button
individualy.
- Many elements are also drawn differently.
For the dark theme, I wanted to have a flatter look.
- Introduce Theme::WidgetStyle enum, for now {Original, Flat}.
- The theme specifies which kind of widget style it wants.
- The drawing code queries the theme's style flag and
switches between the original, gradient based look and
the new, flat look.
- Create some custom icons which look better on dark background
(wip, currently folder/file icons)
- Let ManhattanStyle draw some elements for non-panelwidgets, too
(open/close arrows in QTreeView, custom folder/file icons)
- For the welcomescreen, pass the WelcomeTheme class.
WelcomeTheme exposes theme colors as Q_PROPERTY accessible from
.qml
- Themes can be modified via the 'Themes' tab in the environment
settings.
TODO:
* Unify image handling
* Avoid style name references
* Fix gradients
Change-Id: I92c2050ab0fb327649ea1eff4adec973d2073944
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-10-14 19:09:48 +02:00
|
|
|
using namespace Utils;
|
2014-08-22 17:40:24 +02:00
|
|
|
|
2013-10-16 11:02:37 +02:00
|
|
|
namespace QmakeProjectManager {
|
2012-12-30 15:40:50 +01:00
|
|
|
namespace Internal {
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2014-09-26 11:37:54 +02:00
|
|
|
class ProFileEditorWidget : public TextEditorWidget
|
2014-08-22 17:40:24 +02:00
|
|
|
{
|
2019-03-19 16:03:36 +01:00
|
|
|
private:
|
2018-06-15 19:26:02 +02:00
|
|
|
void findLinkAt(const QTextCursor &,
|
2022-09-30 12:42:20 +02:00
|
|
|
const LinkHandler &processLinkCallback,
|
2018-06-15 19:26:02 +02:00
|
|
|
bool resolveTarget = true,
|
|
|
|
|
bool inNextSplit = false) override;
|
2015-06-01 17:55:31 +02:00
|
|
|
void contextMenuEvent(QContextMenuEvent *) override;
|
2019-03-19 16:03:36 +01:00
|
|
|
|
|
|
|
|
QString checkForPrfFile(const QString &baseName) const;
|
2014-08-22 17:40:24 +02:00
|
|
|
};
|
2010-05-25 16:16:04 +02:00
|
|
|
|
2010-10-14 11:54:29 +02:00
|
|
|
static bool isValidFileNameChar(const QChar &c)
|
|
|
|
|
{
|
2012-12-30 15:40:50 +01:00
|
|
|
return c.isLetterOrNumber()
|
2010-10-14 11:54:29 +02:00
|
|
|
|| c == QLatin1Char('.')
|
|
|
|
|
|| c == QLatin1Char('_')
|
|
|
|
|
|| c == QLatin1Char('-')
|
|
|
|
|
|| c == QLatin1Char('/')
|
2012-12-30 15:40:50 +01:00
|
|
|
|| c == QLatin1Char('\\');
|
2010-10-14 11:54:29 +02:00
|
|
|
}
|
|
|
|
|
|
2019-03-19 16:03:36 +01:00
|
|
|
QString ProFileEditorWidget::checkForPrfFile(const QString &baseName) const
|
|
|
|
|
{
|
2019-05-28 13:49:26 +02:00
|
|
|
const FilePath projectFile = textDocument()->filePath();
|
2019-03-19 16:03:36 +01:00
|
|
|
const QmakePriFileNode *projectNode = nullptr;
|
2020-03-03 14:57:21 +01:00
|
|
|
|
|
|
|
|
// FIXME: Remove this check once project nodes are fully "static".
|
2019-03-19 16:03:36 +01:00
|
|
|
for (const Project * const project : SessionManager::projects()) {
|
2020-03-03 14:57:21 +01:00
|
|
|
static const auto isParsing = [](const Project *project) {
|
|
|
|
|
for (const Target * const t : project->targets()) {
|
|
|
|
|
for (const BuildConfiguration * const bc : t->buildConfigurations()) {
|
|
|
|
|
if (bc->buildSystem()->isParsing())
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
};
|
|
|
|
|
if (isParsing(project))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
ProjectNode * const rootNode = project->rootProjectNode();
|
|
|
|
|
QTC_ASSERT(rootNode, continue);
|
|
|
|
|
projectNode = dynamic_cast<const QmakePriFileNode *>(rootNode
|
2019-03-19 16:03:36 +01:00
|
|
|
->findProjectNode([&projectFile](const ProjectNode *pn) {
|
|
|
|
|
return pn->filePath() == projectFile;
|
|
|
|
|
}));
|
|
|
|
|
if (projectNode)
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (!projectNode)
|
|
|
|
|
return QString();
|
|
|
|
|
const QmakeProFileNode * const proFileNode = projectNode->proFileNode();
|
|
|
|
|
if (!proFileNode)
|
|
|
|
|
return QString();
|
|
|
|
|
const QmakeProFile * const proFile = proFileNode->proFile();
|
|
|
|
|
if (!proFile)
|
|
|
|
|
return QString();
|
|
|
|
|
for (const QString &featureRoot : proFile->featureRoots()) {
|
|
|
|
|
const QFileInfo candidate(featureRoot + '/' + baseName + ".prf");
|
|
|
|
|
if (candidate.exists())
|
|
|
|
|
return candidate.filePath();
|
|
|
|
|
}
|
|
|
|
|
return QString();
|
|
|
|
|
}
|
|
|
|
|
|
2018-02-21 11:58:16 +01:00
|
|
|
void ProFileEditorWidget::findLinkAt(const QTextCursor &cursor,
|
2022-06-03 15:17:33 +02:00
|
|
|
const LinkHandler &processLinkCallback,
|
2018-02-21 11:58:16 +01:00
|
|
|
bool /*resolveTarget*/,
|
|
|
|
|
bool /*inNextSplit*/)
|
2010-10-14 11:54:29 +02:00
|
|
|
{
|
|
|
|
|
Link link;
|
|
|
|
|
|
2018-11-02 14:17:12 +01:00
|
|
|
int line = 0;
|
|
|
|
|
int column = 0;
|
|
|
|
|
convertPosition(cursor.position(), &line, &column);
|
|
|
|
|
const int positionInBlock = column - 1;
|
2010-10-14 11:54:29 +02:00
|
|
|
|
|
|
|
|
const QString block = cursor.block().text();
|
|
|
|
|
|
|
|
|
|
// check if the current position is commented out
|
|
|
|
|
const int hashPos = block.indexOf(QLatin1Char('#'));
|
|
|
|
|
if (hashPos >= 0 && hashPos < positionInBlock)
|
2018-02-21 11:58:16 +01:00
|
|
|
return processLinkCallback(link);
|
2010-10-14 11:54:29 +02:00
|
|
|
|
|
|
|
|
// find the beginning of a filename
|
|
|
|
|
QString buffer;
|
|
|
|
|
int beginPos = positionInBlock - 1;
|
2017-09-20 17:42:28 +02:00
|
|
|
int endPos = positionInBlock;
|
|
|
|
|
|
|
|
|
|
// Check is cursor is somewhere on $${PWD}:
|
|
|
|
|
const int chunkStart = std::max(0, positionInBlock - 7);
|
|
|
|
|
const int chunkLength = 14 + std::min(0, positionInBlock - 7);
|
|
|
|
|
QString chunk = block.mid(chunkStart, chunkLength);
|
|
|
|
|
|
|
|
|
|
const QString curlyPwd = "$${PWD}";
|
|
|
|
|
const QString pwd = "$$PWD";
|
|
|
|
|
const int posCurlyPwd = chunk.indexOf(curlyPwd);
|
|
|
|
|
const int posPwd = chunk.indexOf(pwd);
|
|
|
|
|
bool doBackwardScan = true;
|
|
|
|
|
|
|
|
|
|
if (posCurlyPwd >= 0) {
|
|
|
|
|
const int end = chunkStart + posCurlyPwd + curlyPwd.count();
|
|
|
|
|
const int start = chunkStart + posCurlyPwd;
|
|
|
|
|
if (start <= positionInBlock && end >= positionInBlock) {
|
|
|
|
|
buffer = pwd;
|
|
|
|
|
beginPos = chunkStart + posCurlyPwd - 1;
|
|
|
|
|
endPos = end;
|
|
|
|
|
doBackwardScan = false;
|
|
|
|
|
}
|
|
|
|
|
} else if (posPwd >= 0) {
|
|
|
|
|
const int end = chunkStart + posPwd + pwd.count();
|
|
|
|
|
const int start = chunkStart + posPwd;
|
|
|
|
|
if (start <= positionInBlock && end >= positionInBlock) {
|
|
|
|
|
buffer = pwd;
|
|
|
|
|
beginPos = start - 1;
|
|
|
|
|
endPos = end;
|
|
|
|
|
doBackwardScan = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
while (doBackwardScan && beginPos >= 0) {
|
2010-10-14 11:54:29 +02:00
|
|
|
QChar c = block.at(beginPos);
|
|
|
|
|
if (isValidFileNameChar(c)) {
|
|
|
|
|
buffer.prepend(c);
|
|
|
|
|
beginPos--;
|
|
|
|
|
} else {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-20 17:42:28 +02:00
|
|
|
if (doBackwardScan
|
|
|
|
|
&& beginPos > 0
|
|
|
|
|
&& block.mid(beginPos - 1, pwd.count()) == pwd
|
|
|
|
|
&& (block.at(beginPos + pwd.count() - 1) == '/' || block.at(beginPos + pwd.count() - 1) == '\\')) {
|
|
|
|
|
buffer.prepend("$$");
|
|
|
|
|
beginPos -= 2;
|
|
|
|
|
} else if (doBackwardScan
|
|
|
|
|
&& beginPos >= curlyPwd.count() - 1
|
|
|
|
|
&& block.mid(beginPos - curlyPwd.count() + 1, curlyPwd.count()) == curlyPwd) {
|
|
|
|
|
buffer.prepend(pwd);
|
|
|
|
|
beginPos -= curlyPwd.count();
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-14 11:54:29 +02:00
|
|
|
// find the end of a filename
|
|
|
|
|
while (endPos < block.count()) {
|
|
|
|
|
QChar c = block.at(endPos);
|
|
|
|
|
if (isValidFileNameChar(c)) {
|
|
|
|
|
buffer.append(c);
|
|
|
|
|
endPos++;
|
|
|
|
|
} else {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (buffer.isEmpty())
|
2018-02-21 11:58:16 +01:00
|
|
|
return processLinkCallback(link);
|
2010-10-14 11:54:29 +02:00
|
|
|
|
|
|
|
|
// remove trailing '\' since it can be line continuation char
|
|
|
|
|
if (buffer.at(buffer.size() - 1) == QLatin1Char('\\')) {
|
|
|
|
|
buffer.chop(1);
|
|
|
|
|
endPos--;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if the buffer starts with $$PWD accept it
|
2017-09-20 17:42:28 +02:00
|
|
|
if (buffer.startsWith("$$PWD/") || buffer.startsWith("$$PWD\\"))
|
|
|
|
|
buffer = buffer.mid(6);
|
2010-10-14 11:54:29 +02:00
|
|
|
|
2014-12-21 21:54:30 +02:00
|
|
|
QDir dir(textDocument()->filePath().toFileInfo().absolutePath());
|
2010-10-14 11:54:29 +02:00
|
|
|
QString fileName = dir.filePath(buffer);
|
|
|
|
|
QFileInfo fi(fileName);
|
2022-09-30 12:42:20 +02:00
|
|
|
if (HostOsInfo::isWindowsHost() && fileName.startsWith("//")) {
|
2021-11-16 11:43:55 +01:00
|
|
|
// Windows network paths are not supported here since checking for their existence can
|
|
|
|
|
// lock the gui thread. See: QTCREATORBUG-26579
|
|
|
|
|
} else if (fi.exists()) {
|
2010-10-14 11:54:29 +02:00
|
|
|
if (fi.isDir()) {
|
|
|
|
|
QDir subDir(fi.absoluteFilePath());
|
|
|
|
|
QString subProject = subDir.filePath(subDir.dirName() + QLatin1String(".pro"));
|
2014-10-24 10:28:28 +02:00
|
|
|
if (QFileInfo::exists(subProject))
|
2010-10-14 11:54:29 +02:00
|
|
|
fileName = subProject;
|
|
|
|
|
else
|
2018-02-21 11:58:16 +01:00
|
|
|
return processLinkCallback(link);
|
2010-10-14 11:54:29 +02:00
|
|
|
}
|
2022-09-30 12:42:20 +02:00
|
|
|
link.targetFilePath = FilePath::fromString(QDir::cleanPath(fileName));
|
2019-03-19 16:03:36 +01:00
|
|
|
} else {
|
2022-09-30 12:42:20 +02:00
|
|
|
link.targetFilePath = FilePath::fromString(checkForPrfFile(buffer));
|
2019-03-19 16:03:36 +01:00
|
|
|
}
|
2021-05-25 10:11:31 +02:00
|
|
|
if (!link.targetFilePath.isEmpty()) {
|
2013-02-06 14:23:18 +01:00
|
|
|
link.linkTextStart = cursor.position() - positionInBlock + beginPos + 1;
|
|
|
|
|
link.linkTextEnd = cursor.position() - positionInBlock + endPos;
|
2010-10-14 11:54:29 +02:00
|
|
|
}
|
2018-02-21 11:58:16 +01:00
|
|
|
processLinkCallback(link);
|
2010-10-14 11:54:29 +02:00
|
|
|
}
|
|
|
|
|
|
2011-02-21 16:02:26 +01:00
|
|
|
void ProFileEditorWidget::contextMenuEvent(QContextMenuEvent *e)
|
2010-05-25 16:16:04 +02:00
|
|
|
{
|
2012-07-24 23:30:32 +04:00
|
|
|
showDefaultContextMenu(e, Constants::M_CONTEXT);
|
2010-05-25 16:16:04 +02:00
|
|
|
}
|
|
|
|
|
|
2016-05-30 15:23:52 +02:00
|
|
|
static TextDocument *createProFileDocument()
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2016-05-30 15:23:52 +02:00
|
|
|
auto doc = new TextDocument;
|
|
|
|
|
doc->setId(Constants::PROFILE_EDITOR_ID);
|
|
|
|
|
doc->setMimeType(QLatin1String(Constants::PROFILE_MIMETYPE));
|
|
|
|
|
// qmake project files do not support UTF8-BOM
|
|
|
|
|
// If the BOM would be added qmake would fail and Qt Creator couldn't parse the project file
|
|
|
|
|
doc->setSupportsUtf8Bom(false);
|
|
|
|
|
return doc;
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
2014-08-20 14:43:06 +02:00
|
|
|
//
|
|
|
|
|
// ProFileEditorFactory
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
ProFileEditorFactory::ProFileEditorFactory()
|
|
|
|
|
{
|
2014-08-22 17:40:24 +02:00
|
|
|
setId(Constants::PROFILE_EDITOR_ID);
|
2017-04-24 17:01:10 +02:00
|
|
|
setDisplayName(QCoreApplication::translate("OpenWith::Editors", Constants::PROFILE_EDITOR_DISPLAY_NAME));
|
2014-08-22 17:40:24 +02:00
|
|
|
addMimeType(Constants::PROFILE_MIMETYPE);
|
|
|
|
|
addMimeType(Constants::PROINCLUDEFILE_MIMETYPE);
|
|
|
|
|
addMimeType(Constants::PROFEATUREFILE_MIMETYPE);
|
|
|
|
|
addMimeType(Constants::PROCONFIGURATIONFILE_MIMETYPE);
|
|
|
|
|
addMimeType(Constants::PROCACHEFILE_MIMETYPE);
|
|
|
|
|
addMimeType(Constants::PROSTASHFILE_MIMETYPE);
|
|
|
|
|
|
2016-05-30 15:23:52 +02:00
|
|
|
setDocumentCreator(createProFileDocument);
|
2014-08-22 17:40:24 +02:00
|
|
|
setEditorWidgetCreator([]() { return new ProFileEditorWidget; });
|
|
|
|
|
|
2015-10-05 17:33:09 +02:00
|
|
|
const auto completionAssistProvider = new KeywordsCompletionAssistProvider(qmakeKeywords());
|
|
|
|
|
completionAssistProvider->setDynamicCompletionFunction(&TextEditor::pathComplete);
|
|
|
|
|
setCompletionAssistProvider(completionAssistProvider);
|
2014-10-01 22:39:47 +02:00
|
|
|
|
2022-09-30 12:42:20 +02:00
|
|
|
setCommentDefinition(CommentDefinition::HashStyle);
|
2014-09-02 12:25:20 +02:00
|
|
|
setEditorActionHandlers(TextEditorActionHandler::UnCommentSelection
|
2014-08-22 17:40:24 +02:00
|
|
|
| TextEditorActionHandler::JumpToFileUnderCursor);
|
2014-08-20 14:43:06 +02:00
|
|
|
|
2017-07-26 11:12:32 +02:00
|
|
|
addHoverHandler(new ProFileHoverHandler);
|
|
|
|
|
setSyntaxHighlighterCreator([]() { return new ProFileHighlighter; });
|
2014-09-30 13:08:05 +02:00
|
|
|
|
2016-04-22 15:42:30 +02:00
|
|
|
const QString defaultOverlay = QLatin1String(ProjectExplorer::Constants::FILEOVERLAY_QT);
|
2022-09-30 12:42:20 +02:00
|
|
|
FileIconProvider::registerIconOverlayForSuffix(
|
2016-11-10 15:05:05 +01:00
|
|
|
creatorTheme()->imageFile(Theme::IconOverlayPro, defaultOverlay), "pro");
|
2022-09-30 12:42:20 +02:00
|
|
|
FileIconProvider::registerIconOverlayForSuffix(
|
2016-11-10 15:05:05 +01:00
|
|
|
creatorTheme()->imageFile(Theme::IconOverlayPri, defaultOverlay), "pri");
|
2022-09-30 12:42:20 +02:00
|
|
|
FileIconProvider::registerIconOverlayForSuffix(
|
2016-11-10 15:05:05 +01:00
|
|
|
creatorTheme()->imageFile(Theme::IconOverlayPrf, defaultOverlay), "prf");
|
2014-08-20 14:43:06 +02:00
|
|
|
}
|
|
|
|
|
|
2012-12-30 15:40:50 +01:00
|
|
|
} // namespace Internal
|
2013-10-16 11:02:37 +02:00
|
|
|
} // namespace QmakeProjectManager
|