Merge remote-tracking branch 'origin/4.8'

Change-Id: I0ff6f659b7ccd4ff5a79e422a1d54488508fe05f
This commit is contained in:
Eike Ziller
2018-10-16 07:11:57 +02:00
100 changed files with 344 additions and 224 deletions

View File

@@ -222,8 +222,10 @@
To work with Git branches, select \uicontrol {Branches}. The checked out To work with Git branches, select \uicontrol {Branches}. The checked out
branch is shown in bold and underlined in the list of branches in the branch is shown in bold and underlined in the list of branches in the
\uicontrol {Git Branches} sidebar view. Double-click local branch names to \uicontrol {Git Branches} sidebar view.
edit them.
For local and remote branches, the changes log can be shown by double
clicking on the branch name.
To refresh the list of branches, click \inlineimage reload_gray.png To refresh the list of branches, click \inlineimage reload_gray.png
(\uicontrol Refresh). (\uicontrol Refresh).
@@ -244,7 +246,7 @@
\li Remove a local branch. You cannot delete remote branches. \li Remove a local branch. You cannot delete remote branches.
\row \row
\li \uicontrol Rename \li \uicontrol Rename
\li Rename a local branch. \li Rename a local branch. You cannot rename remote branches.
\row \row
\li \uicontrol{Checkout} \li \uicontrol{Checkout}
\li Check out the selected branch and make it current. You can stash \li Check out the selected branch and make it current. You can stash
@@ -281,6 +283,24 @@
\li Set the current branch to track the selected one. \li Set the current branch to track the selected one.
\endtable \endtable
The following additional context-menu operations are available for
\uicontrol{Remote Branches}. The context-menu can be opened on
\uicontrol{Remote Branches} or on a specific remote repository.
\table
\header
\li Menu Item
\li Description
\row
\li \uicontrol{Fetch}
\li Fetches all the branches and changes information from a
specific remote repository, or from all remotes if applied
to \uicontrol {Remote Branches}.
\row
\li \uicontrol{Manage Remotes}
\li Opens the \uicontrol Remotes dialog.
\endtable
\section3 Configuring Merge Tools \section3 Configuring Merge Tools
Only graphical merge tools are supported. You can configure the Only graphical merge tools are supported. You can configure the

View File

@@ -457,7 +457,7 @@ class Dumper(DumperBase):
self.listMembers(value, nativeType) self.listMembers(value, nativeType)
tdata.templateArguments = self.listTemplateParametersHelper(nativeType) tdata.templateArguments = self.listTemplateParametersHelper(nativeType)
elif code == lldb.eTypeClassFunction: elif code == lldb.eTypeClassFunction:
tdata.code = TypeCodeFunction, tdata.code = TypeCodeFunction
elif code == lldb.eTypeClassMemberPointer: elif code == lldb.eTypeClassMemberPointer:
tdata.code = TypeCodeMemberPointer tdata.code = TypeCodeMemberPointer
@@ -649,6 +649,21 @@ class Dumper(DumperBase):
def isMsvcTarget(self): def isMsvcTarget(self):
return False return False
def prettySymbolByAddress(self, address):
try:
result = lldb.SBCommandReturnObject()
# Cast the address to a function pointer to get the name and location of the function.
expression = 'po (void (*)()){}'
self.debugger.GetCommandInterpreter().HandleCommand(expression.format(address), result)
output = ''
if result.Succeeded():
output = result.GetOutput().strip()
if output:
return output
except:
pass
return '0x%x' % address
def qtVersionAndNamespace(self): def qtVersionAndNamespace(self):
for func in self.target.FindFunctions('qVersion'): for func in self.target.FindFunctions('qVersion'):
name = func.GetSymbol().GetName() name = func.GetSymbol().GetName()

View File

@@ -414,8 +414,6 @@ int main(int argc, char **argv)
Utils::TemporaryDirectory::setMasterTemporaryDirectory(QDir::tempPath() + "/" + Core::Constants::IDE_CASED_ID + "-XXXXXX"); Utils::TemporaryDirectory::setMasterTemporaryDirectory(QDir::tempPath() + "/" + Core::Constants::IDE_CASED_ID + "-XXXXXX");
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false\nqtc.*.info=false"));
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
// increase the number of file that can be opened in Qt Creator. // increase the number of file that can be opened in Qt Creator.
struct rlimit rl; struct rlimit rl;

View File

@@ -33,9 +33,14 @@ msvc: BOTAN_CXX_FLAGS += /wd4100 /wd4800 /wd4127 /wd4244 /wd4250 /wd4267 /wd4334
else: BOTAN_CXX_FLAGS += -Wno-unused-parameter else: BOTAN_CXX_FLAGS += -Wno-unused-parameter
macos: BOTAN_CXX_FLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET -isysroot $$shell_quote($$QMAKE_MAC_SDK_PATH) macos: BOTAN_CXX_FLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET -isysroot $$shell_quote($$QMAKE_MAC_SDK_PATH)
unix: BOTAN_CXX_FLAGS += -fPIC unix: BOTAN_CXX_FLAGS += -fPIC
!isEmpty(BOTAN_CXX_FLAGS): OTHER_FLAGS += --cxxflags=$$shell_quote($$BOTAN_CXX_FLAGS)
win32: OTHER_FLAGS += --link-method=hardlink win32: OTHER_FLAGS += --link-method=hardlink
CONFIG(debug, debug|release): OTHER_FLAGS += --debug-mode CONFIG(debug, debug|release) {
OTHER_FLAGS += --debug-mode
} else {
msvc: BOTAN_CXX_FLAGS += /O2
else: BOTAN_CXX_FLAGS += -O3
}
!isEmpty(BOTAN_CXX_FLAGS): OTHER_FLAGS += --cxxflags=$$shell_quote($$BOTAN_CXX_FLAGS)
CONFIGURE_FILE_PATH_FOR_SHELL = $$shell_quote($$shell_path($$BOTAN_SOURCE_DIR/configure.py)) CONFIGURE_FILE_PATH_FOR_SHELL = $$shell_quote($$shell_path($$BOTAN_SOURCE_DIR/configure.py))
configure_inputs = $$BOTAN_SOURCE_DIR/configure.py configure_inputs = $$BOTAN_SOURCE_DIR/configure.py

View File

@@ -42,7 +42,8 @@ Product {
+ "sha2_32,sha2_32_x86,sha2_64,simd,system_rng,emsa_pkcs1,pbes2,pbkdf2"; + "sha2_32,sha2_32_x86,sha2_64,simd,system_rng,emsa_pkcs1,pbes2,pbkdf2";
args.push("--enable-modules=" + modules); args.push("--enable-modules=" + modules);
var cxxFlags = []; var cxxFlags = [];
if (product.qbs.toolchain.contains("msvc")) { var tc = product.qbs.toolchain;
if (tc.contains("msvc")) {
cxxFlags.push("/wd4100", "/wd4800", "/wd4127", "/wd4244", "/wd4250", "/wd4267", cxxFlags.push("/wd4100", "/wd4800", "/wd4127", "/wd4244", "/wd4250", "/wd4267",
"/wd4334", "/wd4702", "/wd4996", "/D_ENABLE_EXTENDED_ALIGNED_STORAGE"); "/wd4334", "/wd4702", "/wd4996", "/D_ENABLE_EXTENDED_ALIGNED_STORAGE");
} }
@@ -55,10 +56,11 @@ Product {
} }
if (product.qbs.targetOS.contains("unix")) if (product.qbs.targetOS.contains("unix"))
cxxFlags.push("-fPIC"); cxxFlags.push("-fPIC");
if (product.qbs.buildVariant === "release")
cxxFlags.push(tc.contains("msvc") ? "/O2" : "-O3");
if (cxxFlags.length > 0) if (cxxFlags.length > 0)
args.push("--cxxflags=" + cxxFlags.join(" ")); args.push("--cxxflags=" + cxxFlags.join(" "));
var ccOption = "--cc="; var ccOption = "--cc=";
var tc = product.qbs.toolchain;
if (tc.contains("msvc")) if (tc.contains("msvc"))
ccOption += "msvc"; ccOption += "msvc";
else if (tc.contains("clang")) else if (tc.contains("clang"))

View File

@@ -37,7 +37,7 @@
namespace { namespace {
Q_LOGGING_CATEGORY(timersLog, "qtc.clangbackend.timers"); Q_LOGGING_CATEGORY(timersLog, "qtc.clangbackend.timers", QtWarningMsg);
class DebugInspectionDir : public QTemporaryDir class DebugInspectionDir : public QTemporaryDir
{ {

View File

@@ -61,7 +61,7 @@
#include <functional> #include <functional>
Q_LOGGING_CATEGORY(pluginLog, "qtc.extensionsystem") Q_LOGGING_CATEGORY(pluginLog, "qtc.extensionsystem", QtWarningMsg)
const char C_IGNORED_PLUGINS[] = "Plugins/Ignored"; const char C_IGNORED_PLUGINS[] = "Plugins/Ignored";
const char C_FORCEENABLED_PLUGINS[] = "Plugins/ForceEnabled"; const char C_FORCEENABLED_PLUGINS[] = "Plugins/ForceEnabled";

View File

@@ -30,7 +30,7 @@
#include <QTextBlock> #include <QTextBlock>
#include <QTextDocument> #include <QTextDocument>
static Q_LOGGING_CATEGORY(formatterLog, "qtc.qmljs.formatter") static Q_LOGGING_CATEGORY(formatterLog, "qtc.qmljs.formatter", QtWarningMsg)
namespace QmlJS { namespace QmlJS {

View File

@@ -40,7 +40,7 @@ enum {
debug = false debug = false
}; };
static Q_LOGGING_CATEGORY(iconsLog, "qtc.qmljs.icons") static Q_LOGGING_CATEGORY(iconsLog, "qtc.qmljs.icons", QtWarningMsg)
namespace QmlJS { namespace QmlJS {

View File

@@ -35,7 +35,7 @@
#include <algorithm> #include <algorithm>
static Q_LOGGING_CATEGORY(importsLog, "qtc.qmljs.imports") static Q_LOGGING_CATEGORY(importsLog, "qtc.qmljs.imports", QtWarningMsg)
namespace QmlJS { namespace QmlJS {

View File

@@ -54,7 +54,7 @@
namespace QmlJS { namespace QmlJS {
QMLJS_EXPORT Q_LOGGING_CATEGORY(qmljsLog, "qtc.qmljs.common") QMLJS_EXPORT Q_LOGGING_CATEGORY(qmljsLog, "qtc.qmljs.common", QtWarningMsg)
/*! /*!
\class QmlJS::ModelManagerInterface \class QmlJS::ModelManagerInterface

View File

@@ -34,7 +34,7 @@
#include <QFile> #include <QFile>
#include <QLoggingCategory> #include <QLoggingCategory>
static Q_LOGGING_CATEGORY(simpleReaderLog, "qtc.qmljs.simpleReader") static Q_LOGGING_CATEGORY(simpleReaderLog, "qtc.qmljs.simpleReader", QtWarningMsg)
namespace QmlJS{ namespace QmlJS{

View File

@@ -27,6 +27,6 @@
namespace QSsh { namespace QSsh {
namespace Internal { namespace Internal {
Q_LOGGING_CATEGORY(sshLog, "qtc.ssh") Q_LOGGING_CATEGORY(sshLog, "qtc.ssh", QtWarningMsg)
} // namespace Internal } // namespace Internal
} // namespace QSsh } // namespace QSsh

View File

@@ -29,7 +29,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QTimer> #include <QTimer>
static Q_LOGGING_CATEGORY(benchmarksLog, "qtc.benchmark"); static Q_LOGGING_CATEGORY(benchmarksLog, "qtc.benchmark", QtWarningMsg);
namespace Utils { namespace Utils {

View File

@@ -37,7 +37,7 @@
#include <algorithm> #include <algorithm>
namespace { namespace {
Q_LOGGING_CATEGORY(finderLog, "qtc.utils.fileinprojectfinder"); Q_LOGGING_CATEGORY(finderLog, "qtc.utils.fileinprojectfinder", QtWarningMsg);
} }
namespace Utils { namespace Utils {

View File

@@ -42,7 +42,7 @@
#include <functional> #include <functional>
namespace { namespace {
Q_LOGGING_CATEGORY(avdManagerLog, "qtc.android.avdManager") Q_LOGGING_CATEGORY(avdManagerLog, "qtc.android.avdManager", QtWarningMsg)
} }
namespace Android { namespace Android {

View File

@@ -68,7 +68,7 @@ using namespace ProjectExplorer;
using namespace Android::Internal; using namespace Android::Internal;
namespace { namespace {
Q_LOGGING_CATEGORY(buildapkstepLog, "qtc.android.build.androidbuildapkstep") Q_LOGGING_CATEGORY(buildapkstepLog, "qtc.android.build.androidbuildapkstep", QtWarningMsg)
} }
namespace Android { namespace Android {

View File

@@ -77,7 +77,7 @@ using namespace ProjectExplorer;
using namespace Utils; using namespace Utils;
namespace { namespace {
Q_LOGGING_CATEGORY(avdConfigLog, "qtc.android.androidconfig") Q_LOGGING_CATEGORY(avdConfigLog, "qtc.android.androidconfig", QtWarningMsg)
} }
namespace Android { namespace Android {

View File

@@ -48,7 +48,7 @@
#include <QHostAddress> #include <QHostAddress>
namespace { namespace {
Q_LOGGING_CATEGORY(androidDebugSupportLog, "qtc.android.run.androiddebugsupport") Q_LOGGING_CATEGORY(androidDebugSupportLog, "qtc.android.run.androiddebugsupport", QtWarningMsg)
} }
using namespace Debugger; using namespace Debugger;

View File

@@ -64,7 +64,7 @@ using namespace Android;
using namespace Android::Internal; using namespace Android::Internal;
namespace { namespace {
Q_LOGGING_CATEGORY(deployStepLog, "qtc.android.build.androiddeployqtstep") Q_LOGGING_CATEGORY(deployStepLog, "qtc.android.build.androiddeployqtstep", QtWarningMsg)
} }
const QLatin1String UninstallPreviousPackageKey("UninstallPreviousPackage"); const QLatin1String UninstallPreviousPackageKey("UninstallPreviousPackage");

View File

@@ -39,7 +39,7 @@
using namespace ProjectExplorer; using namespace ProjectExplorer;
namespace { namespace {
Q_LOGGING_CATEGORY(androidDeviceLog, "qtc.android.build.androiddevice") Q_LOGGING_CATEGORY(androidDeviceLog, "qtc.android.build.androiddevice", QtWarningMsg)
} }
namespace Android { namespace Android {

View File

@@ -75,7 +75,7 @@ namespace {
const QString apkVersionRegEx("(?<token>package: )(.*?)(versionCode=)'(?<target>.*?)'"); const QString apkVersionRegEx("(?<token>package: )(.*?)(versionCode=)'(?<target>.*?)'");
const QString versionCodeRegEx("(?<token>versionCode=)(?<version>\\d*)"); const QString versionCodeRegEx("(?<token>versionCode=)(?<version>\\d*)");
Q_LOGGING_CATEGORY(androidManagerLog, "qtc.android.androidManager") Q_LOGGING_CATEGORY(androidManagerLog, "qtc.android.androidManager", QtWarningMsg)
QString parseAaptOutput(const QString &output, const QString &regEx) { QString parseAaptOutput(const QString &output, const QString &regEx) {
const QRegularExpression regRx(regEx, const QRegularExpression regRx(regEx,

View File

@@ -45,7 +45,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
namespace { namespace {
Q_LOGGING_CATEGORY(androidRunnerLog, "qtc.android.run.androidrunner") Q_LOGGING_CATEGORY(androidRunnerLog, "qtc.android.run.androidrunner", QtWarningMsg)
} }
using namespace ProjectExplorer; using namespace ProjectExplorer;

View File

@@ -52,7 +52,7 @@
#include <chrono> #include <chrono>
namespace { namespace {
Q_LOGGING_CATEGORY(androidRunWorkerLog, "qtc.android.run.androidrunnerworker") Q_LOGGING_CATEGORY(androidRunWorkerLog, "qtc.android.run.androidrunnerworker", QtWarningMsg)
} }
using namespace std; using namespace std;

View File

@@ -41,7 +41,7 @@
#include <QSettings> #include <QSettings>
namespace { namespace {
Q_LOGGING_CATEGORY(sdkManagerLog, "qtc.android.sdkManager") Q_LOGGING_CATEGORY(sdkManagerLog, "qtc.android.sdkManager", QtWarningMsg)
} }
namespace Android { namespace Android {

View File

@@ -44,7 +44,7 @@
#include <QSortFilterProxyModel> #include <QSortFilterProxyModel>
namespace { namespace {
Q_LOGGING_CATEGORY(androidSdkMgrUiLog, "qtc.android.sdkManagerUi") Q_LOGGING_CATEGORY(androidSdkMgrUiLog, "qtc.android.sdkManagerUi", QtWarningMsg)
} }
namespace Android { namespace Android {

View File

@@ -35,7 +35,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
namespace { namespace {
Q_LOGGING_CATEGORY(androidToolLog, "qtc.android.sdkManager") Q_LOGGING_CATEGORY(androidToolLog, "qtc.android.sdkManager", QtWarningMsg)
} }
namespace Android { namespace Android {

View File

@@ -49,7 +49,7 @@
#include <QFutureInterface> #include <QFutureInterface>
#include <QLoggingCategory> #include <QLoggingCategory>
static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.testcodeparser") static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.testcodeparser", QtWarningMsg)
namespace Autotest { namespace Autotest {
namespace Internal { namespace Internal {

View File

@@ -41,7 +41,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.testconfiguration") static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.testconfiguration", QtWarningMsg)
using namespace ProjectExplorer; using namespace ProjectExplorer;

View File

@@ -40,7 +40,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QSettings> #include <QSettings>
static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.frameworkmanager") static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.frameworkmanager", QtWarningMsg)
namespace Autotest { namespace Autotest {
namespace Internal { namespace Internal {

View File

@@ -28,7 +28,7 @@
namespace ClangCodeModel { namespace ClangCodeModel {
namespace Internal { namespace Internal {
Q_LOGGING_CATEGORY(ipcLog, "qtc.clangcodemodel.ipc") Q_LOGGING_CATEGORY(ipcLog, "qtc.clangcodemodel.ipc", QtWarningMsg)
} // namespace Internal } // namespace Internal
} // namespace ClangCodeModel } // namespace ClangCodeModel

View File

@@ -193,10 +193,11 @@ void BackendReceiver::completions(const CompletionsMessage &message)
void BackendReceiver::annotations(const AnnotationsMessage &message) void BackendReceiver::annotations(const AnnotationsMessage &message)
{ {
qCDebugIpc() << "AnnotationsMessage with" qCDebugIpc() << "AnnotationsMessage"
<< message.diagnostics.size() << "diagnostics" << "for" << QFileInfo(message.fileContainer.filePath).fileName() << "with"
<< message.tokenInfos.size() << "highlighting marks" << message.diagnostics.size() << "diagnostics" << message.tokenInfos.size()
<< message.skippedPreprocessorRanges.size() << "skipped preprocessor ranges"; << "token infos" << message.skippedPreprocessorRanges.size()
<< "skipped preprocessor ranges";
auto processor = ClangEditorDocumentProcessor::get(message.fileContainer.filePath); auto processor = ClangEditorDocumentProcessor::get(message.fileContainer.filePath);
if (!processor) if (!processor)

View File

@@ -40,7 +40,7 @@
#include <QTextCodec> #include <QTextCodec>
#include <QVBoxLayout> #include <QVBoxLayout>
Q_LOGGING_CATEGORY(hoverLog, "qtc.clangcodemodel.hover"); Q_LOGGING_CATEGORY(hoverLog, "qtc.clangcodemodel.hover", QtWarningMsg);
using namespace TextEditor; using namespace TextEditor;

View File

@@ -61,7 +61,7 @@ using namespace ClangCodeModel;
using namespace ClangCodeModel::Internal; using namespace ClangCodeModel::Internal;
using namespace ProjectExplorer; using namespace ProjectExplorer;
static Q_LOGGING_CATEGORY(debug, "qtc.clangcodemodel.batch"); static Q_LOGGING_CATEGORY(debug, "qtc.clangcodemodel.batch", QtWarningMsg);
static int timeOutFromEnvironmentVariable() static int timeOutFromEnvironmentVariable()
{ {

View File

@@ -35,7 +35,7 @@
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
Q_LOGGING_CATEGORY(fixitsLog, "qtc.clangtools.fixits"); Q_LOGGING_CATEGORY(fixitsLog, "qtc.clangtools.fixits", QtWarningMsg);
using namespace Utils; using namespace Utils;

View File

@@ -37,7 +37,7 @@
#include <QDir> #include <QDir>
#include <QLoggingCategory> #include <QLoggingCategory>
static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runner") static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runner", QtWarningMsg)
namespace ClangTools { namespace ClangTools {
namespace Internal { namespace Internal {

View File

@@ -70,7 +70,7 @@ using namespace CppTools;
using namespace ProjectExplorer; using namespace ProjectExplorer;
using namespace Utils; using namespace Utils;
static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runcontrol") static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runcontrol", QtWarningMsg)
static QStringList splitArgs(QString &argsString) static QStringList splitArgs(QString &argsString)
{ {

View File

@@ -38,7 +38,7 @@
#include <QFileInfo> #include <QFileInfo>
#include <QLoggingCategory> #include <QLoggingCategory>
static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runner") static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runner", QtWarningMsg)
namespace ClangTools { namespace ClangTools {
namespace Internal { namespace Internal {

View File

@@ -60,7 +60,7 @@ int distance(const FileName &targetDirectory, const FileName &fileName)
// compiler flags // compiler flags
void CMakeCbpParser::sortFiles() void CMakeCbpParser::sortFiles()
{ {
QLoggingCategory log("qtc.cmakeprojectmanager.filetargetmapping"); QLoggingCategory log("qtc.cmakeprojectmanager.filetargetmapping", QtWarningMsg);
FileNameList fileNames = transform<QList>(m_fileList, &FileNode::filePath); FileNameList fileNames = transform<QList>(m_fileList, &FileNode::filePath);
sort(fileNames); sort(fileNames);

View File

@@ -50,7 +50,7 @@ using namespace QtSupport;
namespace { namespace {
Q_LOGGING_CATEGORY(cmInputLog, "qtc.cmake.import"); Q_LOGGING_CATEGORY(cmInputLog, "qtc.cmake.import", QtWarningMsg);
struct CMakeToolChainData struct CMakeToolChainData
{ {

View File

@@ -57,7 +57,7 @@ const char HANDSHAKE_TYPE[] = "handshake";
const char START_MAGIC[] = "\n[== \"CMake Server\" ==[\n"; const char START_MAGIC[] = "\n[== \"CMake Server\" ==[\n";
const char END_MAGIC[] = "\n]== \"CMake Server\" ==]\n"; const char END_MAGIC[] = "\n]== \"CMake Server\" ==]\n";
Q_LOGGING_CATEGORY(cmakeServerMode, "qtc.cmake.serverMode"); Q_LOGGING_CATEGORY(cmakeServerMode, "qtc.cmake.serverMode", QtWarningMsg);
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
// Helpers: // Helpers:

View File

@@ -65,7 +65,7 @@
#include <QMenu> #include <QMenu>
#include <QMessageBox> #include <QMessageBox>
Q_LOGGING_CATEGORY(log, "qtc.core.documentmanager") Q_LOGGING_CATEGORY(log, "qtc.core.documentmanager", QtWarningMsg)
/*! /*!
\class Core::DocumentManager \class Core::DocumentManager

View File

@@ -47,7 +47,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QTextBlock> #include <QTextBlock>
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.builtineditordocumentprocessor") static Q_LOGGING_CATEGORY(log, "qtc.cpptools.builtineditordocumentprocessor", QtWarningMsg)
namespace { namespace {

View File

@@ -42,7 +42,7 @@ enum { debug = 0 };
using namespace CPlusPlus; using namespace CPlusPlus;
using namespace CppTools; using namespace CppTools;
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.semanticinfoupdater") static Q_LOGGING_CATEGORY(log, "qtc.cpptools.semanticinfoupdater", QtWarningMsg)
namespace CppTools { namespace CppTools {

View File

@@ -58,7 +58,7 @@ using namespace CppTools::Internal;
typedef Document::DiagnosticMessage Message; typedef Document::DiagnosticMessage Message;
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.sourceprocessor") static Q_LOGGING_CATEGORY(log, "qtc.cpptools.sourceprocessor", QtWarningMsg)
namespace { namespace {

View File

@@ -73,7 +73,7 @@ GeneratedCodeModelSupport::GeneratedCodeModelSupport(CppModelManager *modelmanag
CppTools::AbstractEditorSupport(modelmanager, generator), m_generatedFileName(generatedFile), CppTools::AbstractEditorSupport(modelmanager, generator), m_generatedFileName(generatedFile),
m_generator(generator) m_generator(generator)
{ {
QLoggingCategory log("qtc.cpptools.generatedcodemodelsupport"); QLoggingCategory log("qtc.cpptools.generatedcodemodelsupport", QtWarningMsg);
qCDebug(log) << "ctor GeneratedCodeModelSupport for" << m_generator->source() qCDebug(log) << "ctor GeneratedCodeModelSupport for" << m_generator->source()
<< generatedFile; << generatedFile;
@@ -86,7 +86,7 @@ GeneratedCodeModelSupport::~GeneratedCodeModelSupport()
{ {
CppTools::CppModelManager::instance()->emitAbstractEditorSupportRemoved( CppTools::CppModelManager::instance()->emitAbstractEditorSupportRemoved(
m_generatedFileName.toString()); m_generatedFileName.toString());
QLoggingCategory log("qtc.cpptools.generatedcodemodelsupport"); QLoggingCategory log("qtc.cpptools.generatedcodemodelsupport", QtWarningMsg);
qCDebug(log) << "dtor ~generatedcodemodelsupport for" << m_generatedFileName; qCDebug(log) << "dtor ~generatedcodemodelsupport for" << m_generatedFileName;
} }

View File

@@ -40,7 +40,7 @@ using namespace TextEditor;
using SemanticHighlighter::incrementalApplyExtraAdditionalFormats; using SemanticHighlighter::incrementalApplyExtraAdditionalFormats;
using SemanticHighlighter::clearExtraAdditionalFormatsUntilEnd; using SemanticHighlighter::clearExtraAdditionalFormatsUntilEnd;
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.semantichighlighter") static Q_LOGGING_CATEGORY(log, "qtc.cpptools.semantichighlighter", QtWarningMsg)
namespace CppTools { namespace CppTools {

View File

@@ -1557,8 +1557,11 @@ bool BreakHandler::setData(const QModelIndex &idx, const QVariant &value, int ro
const bool isEnabled = (bps.isEmpty() && sbps.isEmpty()) const bool isEnabled = (bps.isEmpty() && sbps.isEmpty())
|| (!bps.isEmpty() && bps.at(0)->isEnabled()) || (!bps.isEmpty() && bps.at(0)->isEnabled())
|| (!sbps.isEmpty() && sbps.at(0)->params.enabled); || (!sbps.isEmpty() && sbps.at(0)->params.enabled);
for (Breakpoint bp : bps) for (Breakpoint bp : bps) {
requestBreakpointEnabling(bp, !isEnabled); requestBreakpointEnabling(bp, !isEnabled);
if (GlobalBreakpoint gbp = bp->globalBreakpoint())
gbp->setEnabled(!isEnabled, false);
}
for (SubBreakpoint sbp : sbps) for (SubBreakpoint sbp : sbps)
requestSubBreakpointEnabling(sbp, !isEnabled); requestSubBreakpointEnabling(sbp, !isEnabled);
return true; return true;
@@ -1642,8 +1645,11 @@ bool BreakHandler::contextMenuEvent(const ItemViewEvent &ev)
: breakpointsEnabled ? tr("Disable Breakpoint") : tr("Enable Breakpoint"), : breakpointsEnabled ? tr("Disable Breakpoint") : tr("Enable Breakpoint"),
!selectedBreakpoints.isEmpty(), !selectedBreakpoints.isEmpty(),
[this, selectedBreakpoints, breakpointsEnabled] { [this, selectedBreakpoints, breakpointsEnabled] {
for (Breakpoint bp : selectedBreakpoints) for (Breakpoint bp : selectedBreakpoints) {
requestBreakpointEnabling(bp, !breakpointsEnabled); requestBreakpointEnabling(bp, !breakpointsEnabled);
if (GlobalBreakpoint gbp = bp->globalBreakpoint())
gbp->setEnabled(!breakpointsEnabled, false);
}
} }
); );
@@ -2311,13 +2317,14 @@ void GlobalBreakpointItem::updateMarker()
m_marker->setToolTip(toolTip()); m_marker->setToolTip(toolTip());
} }
void GlobalBreakpointItem::setEnabled(bool enabled) void GlobalBreakpointItem::setEnabled(bool enabled, bool descend)
{ {
QTC_CHECK(m_params.enabled != enabled); QTC_CHECK(m_params.enabled != enabled);
m_params.enabled = enabled; m_params.enabled = enabled;
updateMarkerIcon(); updateMarkerIcon();
update(); update();
if (descend) {
for (QPointer<DebuggerEngine> engine : EngineManager::engines()) { for (QPointer<DebuggerEngine> engine : EngineManager::engines()) {
BreakHandler *handler = engine->breakHandler(); BreakHandler *handler = engine->breakHandler();
for (Breakpoint bp : handler->breakpoints()) { for (Breakpoint bp : handler->breakpoints()) {
@@ -2325,6 +2332,7 @@ void GlobalBreakpointItem::setEnabled(bool enabled)
handler->requestBreakpointEnabling(bp, enabled); handler->requestBreakpointEnabling(bp, enabled);
} }
} }
}
} }
void GlobalBreakpointItem::destroyMarker() void GlobalBreakpointItem::destroyMarker()

View File

@@ -85,7 +85,7 @@ public:
int modelId() const; int modelId() const;
bool isEnabled() const { return m_params.enabled; } bool isEnabled() const { return m_params.enabled; }
void setEnabled(bool enabled); void setEnabled(bool enabled, bool descend = true);
const BreakpointParameters &requestedParameters() const { return m_params; } const BreakpointParameters &requestedParameters() const { return m_params; }

View File

@@ -59,7 +59,7 @@ using namespace QmlDebug::Constants;
namespace Debugger { namespace Debugger {
namespace Internal { namespace Internal {
Q_LOGGING_CATEGORY(qmlInspectorLog, "qtc.dbg.qmlinspector") Q_LOGGING_CATEGORY(qmlInspectorLog, "qtc.dbg.qmlinspector", QtWarningMsg)
/*! /*!
* DebuggerAgent updates the watchhandler with the object tree data. * DebuggerAgent updates the watchhandler with the object tree data.

View File

@@ -239,8 +239,7 @@ void UnstartedAppWatcherDialog::pidFound(const DeviceProcessItem &p)
void UnstartedAppWatcherDialog::startStopWatching(bool start) void UnstartedAppWatcherDialog::startStopWatching(bool start)
{ {
setWaitingState(start ? WatchingState : NotWatchingState); setWaitingState(start ? WatchingState : NotWatchingState);
m_watchingPushButton->setText(start ? QLatin1String("Stop Watching") m_watchingPushButton->setText(start ? tr("Stop Watching") : tr("Start Watching"));
: QLatin1String("Start Watching"));
startStopTimer(start); startStopTimer(start);
} }

View File

@@ -166,12 +166,10 @@ void BranchView::slotCustomContextMenu(const QPoint &point)
return; return;
const QModelIndex currentBranch = m_model->currentBranch(); const QModelIndex currentBranch = m_model->currentBranch();
const bool hasSelection = index.isValid(); const bool currentSelected = index.row() == currentBranch.row();
const bool currentSelected = hasSelection && index == currentBranch;
const bool isLocal = m_model->isLocal(index); const bool isLocal = m_model->isLocal(index);
const bool isLeaf = m_model->isLeaf(index);
const bool isTag = m_model->isTag(index); const bool isTag = m_model->isTag(index);
const bool hasActions = hasSelection && isLeaf; const bool hasActions = m_model->isLeaf(index);
const bool currentLocal = m_model->isLocal(currentBranch); const bool currentLocal = m_model->isLocal(currentBranch);
QMenu contextMenu; QMenu contextMenu;

View File

@@ -47,7 +47,7 @@ namespace Ios {
namespace Internal { namespace Internal {
namespace { namespace {
Q_LOGGING_CATEGORY(iosSettingsLog, "qtc.ios.common") Q_LOGGING_CATEGORY(iosSettingsLog, "qtc.ios.common", QtWarningMsg)
} }
static const int IdentifierRole = Qt::UserRole+1; static const int IdentifierRole = Qt::UserRole+1;

View File

@@ -71,8 +71,8 @@ using namespace Utils;
using namespace Debugger; using namespace Debugger;
namespace { namespace {
Q_LOGGING_CATEGORY(kitSetupLog, "qtc.ios.kitSetup") Q_LOGGING_CATEGORY(kitSetupLog, "qtc.ios.kitSetup", QtWarningMsg)
Q_LOGGING_CATEGORY(iosCommonLog, "qtc.ios.common") Q_LOGGING_CATEGORY(iosCommonLog, "qtc.ios.common", QtWarningMsg)
} }
using ToolChainPair = std::pair<ClangToolChain *, ClangToolChain *>; using ToolChainPair = std::pair<ClangToolChain *, ClangToolChain *>;

View File

@@ -49,7 +49,7 @@
using namespace ProjectExplorer; using namespace ProjectExplorer;
namespace { namespace {
Q_LOGGING_CATEGORY(detectLog, "qtc.ios.deviceDetect") Q_LOGGING_CATEGORY(detectLog, "qtc.ios.deviceDetect", QtWarningMsg)
} }
#ifdef Q_OS_MAC #ifdef Q_OS_MAC

View File

@@ -53,7 +53,7 @@ using namespace QtSupport;
namespace Ios { namespace Ios {
namespace Internal { namespace Internal {
Q_LOGGING_CATEGORY(iosLog, "qtc.ios.common") Q_LOGGING_CATEGORY(iosLog, "qtc.ios.common", QtWarningMsg)
class IosPluginPrivate class IosPluginPrivate
{ {

View File

@@ -33,7 +33,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QProcess> #include <QProcess>
static Q_LOGGING_CATEGORY(probeLog, "qtc.ios.probe") static Q_LOGGING_CATEGORY(probeLog, "qtc.ios.probe", QtWarningMsg)
namespace Ios { namespace Ios {

View File

@@ -58,7 +58,7 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
static Q_LOGGING_CATEGORY(toolHandlerLog, "qtc.ios.toolhandler") static Q_LOGGING_CATEGORY(toolHandlerLog, "qtc.ios.toolhandler", QtWarningMsg)
namespace Ios { namespace Ios {

View File

@@ -47,7 +47,7 @@
using namespace std; using namespace std;
namespace { namespace {
Q_LOGGING_CATEGORY(simulatorLog, "qtc.ios.simulator") Q_LOGGING_CATEGORY(simulatorLog, "qtc.ios.simulator", QtWarningMsg)
} }
namespace Ios { namespace Ios {

View File

@@ -34,7 +34,7 @@
#include <QPushButton> #include <QPushButton>
namespace { namespace {
Q_LOGGING_CATEGORY(iosCommon, "qtc.ios.common") Q_LOGGING_CATEGORY(iosCommon, "qtc.ios.common", QtWarningMsg)
} }
namespace Ios { namespace Ios {

View File

@@ -58,8 +58,8 @@ using namespace Utils;
namespace LanguageClient { namespace LanguageClient {
static Q_LOGGING_CATEGORY(LOGLSPCLIENT, "qtc.languageclient.client"); static Q_LOGGING_CATEGORY(LOGLSPCLIENT, "qtc.languageclient.client", QtWarningMsg);
static Q_LOGGING_CATEGORY(LOGLSPCLIENTV, "qtc.languageclient.messages"); static Q_LOGGING_CATEGORY(LOGLSPCLIENTV, "qtc.languageclient.messages", QtWarningMsg);
BaseClient::BaseClient() BaseClient::BaseClient()
: m_id(Core::Id::fromString(QUuid::createUuid().toString())) : m_id(Core::Id::fromString(QUuid::createUuid().toString()))
@@ -499,6 +499,11 @@ bool BaseClient::isSupportedMimeType(const QString &mimeType) const
return m_supportedMimeTypes.isEmpty() || m_supportedMimeTypes.contains(mimeType); return m_supportedMimeTypes.isEmpty() || m_supportedMimeTypes.contains(mimeType);
} }
bool BaseClient::needsRestart(const BaseSettings *) const
{
return false;
}
bool BaseClient::reset() bool BaseClient::reset()
{ {
if (!m_restartsLeft) if (!m_restartsLeft)
@@ -756,10 +761,15 @@ StdIOClient::~StdIOClient()
Utils::SynchronousProcess::stopProcess(m_process); Utils::SynchronousProcess::stopProcess(m_process);
} }
bool StdIOClient::needsRestart(const StdIOSettings *settings)
{
return m_executable != settings->m_executable || m_arguments != settings->m_arguments;
}
bool StdIOClient::start() bool StdIOClient::start()
{ {
m_process.start(); m_process.start();
if (!m_process.waitForStarted() && m_process.state() != QProcess::Running) { if (!m_process.waitForStarted() || m_process.state() != QProcess::Running) {
setError(m_process.errorString()); setError(m_process.errorString());
return false; return false;
} }
@@ -771,11 +781,6 @@ void StdIOClient::setWorkingDirectory(const QString &workingDirectory)
m_process.setWorkingDirectory(workingDirectory); m_process.setWorkingDirectory(workingDirectory);
} }
bool StdIOClient::matches(const BaseSettings *setting)
{
return setting->m_executable == m_executable && setting->m_arguments == m_arguments;
}
void StdIOClient::sendData(const QByteArray &data) void StdIOClient::sendData(const QByteArray &data)
{ {
if (m_process.state() != QProcess::Running) { if (m_process.state() != QProcess::Running) {

View File

@@ -112,8 +112,9 @@ public:
Core::Id id() const { return m_id; } Core::Id id() const { return m_id; }
bool needsRestart(const BaseSettings *) const;
virtual bool start() { return true; } virtual bool start() { return true; }
virtual bool matches(const BaseSettings * /*setting*/) { return false; }
virtual bool reset(); virtual bool reset();
void log(const QString &message, void log(const QString &message,
@@ -175,12 +176,12 @@ public:
StdIOClient &operator=(const StdIOClient &) = delete; StdIOClient &operator=(const StdIOClient &) = delete;
StdIOClient &operator=(StdIOClient &&) = delete; StdIOClient &operator=(StdIOClient &&) = delete;
bool needsRestart(const StdIOSettings *settings);
bool start() override; bool start() override;
void setWorkingDirectory(const QString &workingDirectory); void setWorkingDirectory(const QString &workingDirectory);
bool matches(const BaseSettings *setting) override;
protected: protected:
void sendData(const QByteArray &data) final; void sendData(const QByteArray &data) final;
QProcess m_process; QProcess m_process;

View File

@@ -43,7 +43,7 @@
#include <QTextDocument> #include <QTextDocument>
#include <QTime> #include <QTime>
static Q_LOGGING_CATEGORY(LOGLSPCOMPLETION, "qtc.languageclient.completion"); static Q_LOGGING_CATEGORY(LOGLSPCOMPLETION, "qtc.languageclient.completion", QtWarningMsg);
using namespace LanguageServerProtocol; using namespace LanguageServerProtocol;

View File

@@ -167,6 +167,7 @@ void LanguageClientManager::removeMarks(const Core::Id &id)
void LanguageClientManager::startClient(BaseClient *client) void LanguageClientManager::startClient(BaseClient *client)
{ {
QTC_ASSERT(client, return);
if (managerInstance->m_shuttingDown) { if (managerInstance->m_shuttingDown) {
managerInstance->clientFinished(client); managerInstance->clientFinished(client);
return; return;
@@ -214,8 +215,12 @@ void LanguageClientManager::shutdown()
if (managerInstance->m_shuttingDown) if (managerInstance->m_shuttingDown)
return; return;
managerInstance->m_shuttingDown = true; managerInstance->m_shuttingDown = true;
for (auto interface : managerInstance->m_clients) for (auto interface : managerInstance->m_clients) {
if (interface->reachable())
interface->shutdown(); interface->shutdown();
else
deleteClient(interface);
}
} }
LanguageClientManager *LanguageClientManager::instance() LanguageClientManager *LanguageClientManager::instance()

View File

@@ -23,8 +23,10 @@
** **
****************************************************************************/ ****************************************************************************/
#include "languageclientmanager.h"
#include "languageclientsettings.h" #include "languageclientsettings.h"
#include "baseclient.h"
#include "languageclientmanager.h"
#include "languageclient_global.h" #include "languageclient_global.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
@@ -71,8 +73,9 @@ public:
bool setData(const QModelIndex &index, const QVariant &value, int role) override; bool setData(const QModelIndex &index, const QVariant &value, int role) override;
Qt::ItemFlags flags(const QModelIndex &index) const override; Qt::ItemFlags flags(const QModelIndex &index) const override;
void reset(const QList<BaseSettings *> &settings); void reset(const QList<StdIOSettings *> &settings);
QList<BaseSettings *> settings() const { return m_settings; } QList<StdIOSettings *> settings() const { return m_settings; }
QList<StdIOSettings *> removed() const { return m_removed; }
enum Columns { enum Columns {
DisplayNameColumn = 0, DisplayNameColumn = 0,
@@ -84,7 +87,8 @@ public:
}; };
private: private:
QList<BaseSettings *> m_settings; // owned QList<StdIOSettings *> m_settings; // owned
QList<StdIOSettings *> m_removed;
}; };
class LanguageClientSettingsPageWidget : public QWidget class LanguageClientSettingsPageWidget : public QWidget
@@ -115,7 +119,7 @@ public:
private: private:
LanguageClientSettingsModel m_model; LanguageClientSettingsModel m_model;
QList<BaseSettings *> m_settings; // owned QList<StdIOSettings *> m_settings; // owned
QPointer<LanguageClientSettingsPageWidget> m_widget; QPointer<LanguageClientSettingsPageWidget> m_widget;
}; };
@@ -216,6 +220,7 @@ void LanguageClientSettingsPage::init()
{ {
m_model.reset(LanguageClientSettings::fromSettings(Core::ICore::settings())); m_model.reset(LanguageClientSettings::fromSettings(Core::ICore::settings()));
apply(); apply();
finish();
} }
QWidget *LanguageClientSettingsPage::widget() QWidget *LanguageClientSettingsPage::widget()
@@ -228,43 +233,33 @@ QWidget *LanguageClientSettingsPage::widget()
void LanguageClientSettingsPage::apply() void LanguageClientSettingsPage::apply()
{ {
qDeleteAll(m_settings); qDeleteAll(m_settings);
m_settings = Utils::transform(m_model.settings(), [](const BaseSettings *other){ m_settings = Utils::transform(m_model.settings(), [](const StdIOSettings *other){
return new BaseSettings(*other); return dynamic_cast<StdIOSettings *>(other->copy());
}); });
LanguageClientSettings::toSettings(Core::ICore::settings(), m_settings); LanguageClientSettings::toSettings(Core::ICore::settings(), m_settings);
const QVector<BaseClient *> interfaces(LanguageClientManager::clients()); QList<StdIOSettings *> restarts = Utils::filtered(m_settings, &StdIOSettings::needsRestart);
QVector<BaseClient *> toShutdown; for (auto setting : restarts + m_model.removed()) {
QList<BaseSettings *> toStart = m_settings; if (auto client = setting->m_client) {
// check currently registered interfaces if (client->reachable())
for (auto interface : interfaces) { client->shutdown();
auto setting = Utils::findOr(m_settings, nullptr,
[interface](const BaseSettings *setting){
return interface->matches(setting);
});
if (setting && setting->isValid() && setting->m_enabled) {
toStart.removeAll(setting);
if (!interface->isSupportedMimeType(setting->m_mimeType))
interface->setSupportedMimeType({setting->m_mimeType});
} else {
toShutdown << interface;
}
}
for (auto interface : toShutdown) {
if (interface->reachable())
interface->shutdown();
else else
LanguageClientManager::deleteClient(interface); LanguageClientManager::deleteClient(client);
} }
for (auto setting : toStart) {
if (setting && setting->isValid() && setting->m_enabled)
LanguageClientManager::startClient(setting->createClient());
} }
for (StdIOSettings *setting : restarts) {
if (setting && setting->isValid() && setting->m_enabled) {
if (auto client = setting->createClient()) {
setting->m_client = client;
LanguageClientManager::startClient(client);
}
}
}
m_model.reset(m_settings);
} }
void LanguageClientSettingsPage::finish() void LanguageClientSettingsPage::finish()
{ {
m_model.reset(m_settings);
} }
LanguageClientSettingsModel::~LanguageClientSettingsModel() LanguageClientSettingsModel::~LanguageClientSettingsModel()
@@ -276,7 +271,7 @@ QVariant LanguageClientSettingsModel::data(const QModelIndex &index, int role) c
{ {
if (!index.isValid()) if (!index.isValid())
return QVariant(); return QVariant();
BaseSettings *setting = m_settings[index.row()]; StdIOSettings *setting = m_settings[index.row()];
QTC_ASSERT(setting, return false); QTC_ASSERT(setting, return false);
if (role == Qt::DisplayRole || role == Qt::EditRole) { if (role == Qt::DisplayRole || role == Qt::EditRole) {
switch (index.column()) { switch (index.column()) {
@@ -313,7 +308,7 @@ bool LanguageClientSettingsModel::removeRows(int row, int count, const QModelInd
const int end = qMin(row + count - 1, int(m_settings.size()) - 1); const int end = qMin(row + count - 1, int(m_settings.size()) - 1);
beginRemoveRows(parent, row, end); beginRemoveRows(parent, row, end);
for (auto i = end; i >= row; --i) for (auto i = end; i >= row; --i)
delete m_settings.takeAt(i); m_removed << m_settings.takeAt(i);
endRemoveRows(); endRemoveRows();
return true; return true;
} }
@@ -324,7 +319,7 @@ bool LanguageClientSettingsModel::insertRows(int row, int count, const QModelInd
return false; return false;
beginInsertRows(parent, row, row + count - 1); beginInsertRows(parent, row, row + count - 1);
for (int i = 0; i < count; ++i) for (int i = 0; i < count; ++i)
m_settings.insert(row + i, new BaseSettings()); m_settings.insert(row + i, new StdIOSettings());
endInsertRows(); endInsertRows();
return true; return true;
} }
@@ -333,23 +328,31 @@ bool LanguageClientSettingsModel::setData(const QModelIndex &index, const QVaria
{ {
if (!index.isValid()) if (!index.isValid())
return false; return false;
BaseSettings *setting = m_settings[index.row()]; StdIOSettings *setting = m_settings[index.row()];
QTC_ASSERT(setting, return false); QTC_ASSERT(setting, return false);
if (role == Qt::DisplayRole || role == Qt::EditRole) { if (role == Qt::DisplayRole || role == Qt::EditRole) {
const QString strVal(value.toString());
QString *settingsValue = nullptr;
switch (index.column()) { switch (index.column()) {
case DisplayNameColumn: setting->m_name = value.toString(); break; case DisplayNameColumn: settingsValue = &setting->m_name; break;
case MimeTypeColumn: setting->m_mimeType = value.toString(); break; case MimeTypeColumn: settingsValue = &setting->m_mimeType; break;
case ExecutableColumn: setting->m_executable = value.toString(); break; case ExecutableColumn: settingsValue = &setting->m_executable; break;
case ArgumentsColumn: setting->m_arguments = value.toString(); break; case ArgumentsColumn: settingsValue = &setting->m_arguments; break;
default:
return false;
} }
if (settingsValue) {
if (strVal != *settingsValue) {
*settingsValue = value.toString();
emit dataChanged(index, index, { Qt::EditRole, Qt::DisplayRole }); emit dataChanged(index, index, { Qt::EditRole, Qt::DisplayRole });
}
return true; return true;
} }
}
if (role == Qt::CheckStateRole && index.column() == EnabledColumn) { if (role == Qt::CheckStateRole && index.column() == EnabledColumn) {
setting->m_enabled = value.toBool(); if (setting->m_enabled != value.toBool()) {
setting->m_enabled = !setting->m_enabled;
emit dataChanged(index, index, { Qt::CheckStateRole }); emit dataChanged(index, index, { Qt::CheckStateRole });
}
return true; return true;
} }
return false; return false;
@@ -363,28 +366,31 @@ Qt::ItemFlags LanguageClientSettingsModel::flags(const QModelIndex &index) const
return defaultFlags; return defaultFlags;
} }
void LanguageClientSettingsModel::reset(const QList<BaseSettings *> &settings) void LanguageClientSettingsModel::reset(const QList<StdIOSettings *> &settings)
{ {
beginResetModel(); beginResetModel();
qDeleteAll(m_settings); qDeleteAll(m_settings);
m_settings = Utils::transform(settings, [](const BaseSettings *setting){ qDeleteAll(m_removed);
return new BaseSettings(*setting); m_removed.clear();
m_settings = Utils::transform(settings, [](const StdIOSettings *other){
return dynamic_cast<StdIOSettings *>(other->copy());
}); });
endResetModel(); endResetModel();
} }
bool BaseSettings::isValid() bool BaseSettings::needsRestart() const
{ {
return !m_name.isEmpty() && !m_executable.isEmpty() && QFile::exists(m_executable); return m_client ? !m_enabled || m_client->needsRestart(this) : m_enabled;
} }
BaseClient *BaseSettings::createClient() bool BaseSettings::isValid() const
{ {
auto client = new StdIOClient(m_executable, m_arguments); return !m_name.isEmpty();
client->setName(m_name); }
if (m_mimeType != noLanguageFilter)
client->setSupportedMimeType({m_mimeType}); BaseClient *BaseSettings::createClient() const
return client; {
return nullptr;
} }
QVariantMap BaseSettings::toMap() const QVariantMap BaseSettings::toMap() const
@@ -393,8 +399,6 @@ QVariantMap BaseSettings::toMap() const
map.insert(nameKey, m_name); map.insert(nameKey, m_name);
map.insert(enabledKey, m_enabled); map.insert(enabledKey, m_enabled);
map.insert(mimeTypeKey, m_mimeType); map.insert(mimeTypeKey, m_mimeType);
map.insert(executableKey, m_executable);
map.insert(argumentsKey, m_arguments);
return map; return map;
} }
@@ -403,8 +407,6 @@ void BaseSettings::fromMap(const QVariantMap &map)
m_name = map[nameKey].toString(); m_name = map[nameKey].toString();
m_enabled = map[enabledKey].toBool(); m_enabled = map[enabledKey].toBool();
m_mimeType = map[mimeTypeKey].toString(); m_mimeType = map[mimeTypeKey].toString();
m_executable = map[executableKey].toString();
m_arguments = map[argumentsKey].toString();
} }
void LanguageClientSettings::init() void LanguageClientSettings::init()
@@ -413,12 +415,12 @@ void LanguageClientSettings::init()
settingsPage.init(); settingsPage.init();
} }
QList<BaseSettings *> LanguageClientSettings::fromSettings(QSettings *settingsIn) QList<StdIOSettings *> LanguageClientSettings::fromSettings(QSettings *settingsIn)
{ {
settingsIn->beginGroup(settingsGroupKey); settingsIn->beginGroup(settingsGroupKey);
auto variants = settingsIn->value(clientsKey).toList(); auto variants = settingsIn->value(clientsKey).toList();
auto settings = Utils::transform(variants, [](const QVariant& var){ auto settings = Utils::transform(variants, [](const QVariant& var){
auto settings = new BaseSettings(); auto settings = new StdIOSettings();
settings->fromMap(var.toMap()); settings->fromMap(var.toMap());
return settings; return settings;
}); });
@@ -426,14 +428,52 @@ QList<BaseSettings *> LanguageClientSettings::fromSettings(QSettings *settingsIn
return settings; return settings;
} }
void LanguageClientSettings::toSettings(QSettings *settings, const QList<BaseSettings *> &languageClientSettings) void LanguageClientSettings::toSettings(QSettings *settings, const QList<StdIOSettings *> &languageClientSettings)
{ {
settings->beginGroup(settingsGroupKey); settings->beginGroup(settingsGroupKey);
settings->setValue(clientsKey, Utils::transform(languageClientSettings, settings->setValue(clientsKey, Utils::transform(languageClientSettings,
[](const BaseSettings *setting){ [](const StdIOSettings *setting){
return QVariant(setting->toMap()); return QVariant(setting->toMap());
})); }));
settings->endGroup(); settings->endGroup();
} }
bool StdIOSettings::needsRestart() const
{
if (BaseSettings::needsRestart())
return true;
if (auto stdIOClient = qobject_cast<StdIOClient *>(m_client))
return stdIOClient->needsRestart(this);
return false;
}
bool StdIOSettings::isValid() const
{
return BaseSettings::isValid() && !m_executable.isEmpty();
}
BaseClient *StdIOSettings::createClient() const
{
auto client = new StdIOClient(m_executable, m_arguments);
client->setName(m_name);
if (m_mimeType != noLanguageFilter)
client->setSupportedMimeType({m_mimeType});
return client;
}
QVariantMap StdIOSettings::toMap() const
{
QVariantMap map = BaseSettings::toMap();
map.insert(executableKey, m_executable);
map.insert(argumentsKey, m_arguments);
return map;
}
void StdIOSettings::fromMap(const QVariantMap &map)
{
BaseSettings::fromMap(map);
m_executable = map[executableKey].toString();
m_arguments = map[argumentsKey].toString();
}
} // namespace LanguageClient } // namespace LanguageClient

View File

@@ -41,35 +41,69 @@ class BaseSettings
{ {
public: public:
BaseSettings() = default; BaseSettings() = default;
BaseSettings(const QString &name, bool enabled, const QString &mimeTypeName, BaseSettings(const QString &name, bool enabled, const QString &mimeTypeName)
const QString &executable, const QString &arguments)
: m_name(name) : m_name(name)
, m_enabled(enabled) , m_enabled(enabled)
, m_mimeType(mimeTypeName) , m_mimeType(mimeTypeName)
, m_executable(executable)
, m_arguments(arguments)
{} {}
virtual ~BaseSettings() = default;
QString m_name = QString("New Language Server"); QString m_name = QString("New Language Server");
bool m_enabled = true; bool m_enabled = true;
QString m_mimeType = QLatin1String(noLanguageFilter); QString m_mimeType = QLatin1String(noLanguageFilter);
QPointer<BaseClient> m_client; // not owned
virtual BaseSettings *copy() const { return new BaseSettings(*this); }
virtual bool needsRestart() const;
virtual bool isValid() const ;
virtual BaseClient *createClient() const;
virtual QVariantMap toMap() const;
virtual void fromMap(const QVariantMap &map);
protected:
BaseSettings(const BaseSettings &other) = default;
BaseSettings(BaseSettings &&other) = default;
BaseSettings &operator=(const BaseSettings &other) = default;
BaseSettings &operator=(BaseSettings &&other) = default;
};
class StdIOSettings : public BaseSettings
{
public:
StdIOSettings() = default;
StdIOSettings(const QString &name, bool enabled, const QString &mimeTypeName,
const QString &executable, const QString &arguments)
: BaseSettings(name, enabled, mimeTypeName)
, m_executable(executable)
, m_arguments(arguments)
{}
~StdIOSettings() override = default;
QString m_executable; QString m_executable;
QString m_arguments; QString m_arguments;
bool isValid(); BaseSettings *copy() const override { return new StdIOSettings(*this); }
bool needsRestart() const override;
bool isValid() const override;
BaseClient *createClient() const override;
QVariantMap toMap() const override;
void fromMap(const QVariantMap &map) override;
BaseClient *createClient(); protected:
StdIOSettings(const StdIOSettings &other) = default;
QVariantMap toMap() const; StdIOSettings(StdIOSettings &&other) = default;
void fromMap(const QVariantMap &map); StdIOSettings &operator=(const StdIOSettings &other) = default;
StdIOSettings &operator=(StdIOSettings &&other) = default;
}; };
class LanguageClientSettings class LanguageClientSettings
{ {
public: public:
static void init(); static void init();
static QList<BaseSettings *> fromSettings(QSettings *settings); static QList<StdIOSettings *> fromSettings(QSettings *settings);
static void toSettings(QSettings *settings, const QList<BaseSettings *> &languageClientSettings); static void toSettings(QSettings *settings, const QList<StdIOSettings *> &languageClientSettings);
}; };
} // namespace LanguageClient } // namespace LanguageClient

View File

@@ -551,7 +551,7 @@ void ModelIndexer::removeDiagramReferenceFile(const QString &file,
const QLoggingCategory &ModelIndexer::logger() const QLoggingCategory &ModelIndexer::logger()
{ {
static const QLoggingCategory category("qtc.modeleditor.modelindexer"); static const QLoggingCategory category("qtc.modeleditor.modelindexer", QtWarningMsg);
return category; return category;
} }

View File

@@ -56,7 +56,7 @@
#include <memory> #include <memory>
namespace { namespace {
Q_LOGGING_CATEGORY(gccLog, "qtc.projectexplorer.toolchain.gcc"); Q_LOGGING_CATEGORY(gccLog, "qtc.projectexplorer.toolchain.gcc", QtWarningMsg);
} // namespace } // namespace
using namespace Utils; using namespace Utils;

View File

@@ -88,7 +88,7 @@ QList<BuildInfo *> ProjectImporter::import(const Utils::FileName &importPath, bo
{ {
QList<BuildInfo *> result; QList<BuildInfo *> result;
const QLoggingCategory log("qtc.projectexplorer.import"); const QLoggingCategory log("qtc.projectexplorer.import", QtWarningMsg);
qCDebug(log) << "ProjectImporter::import" << importPath << silent; qCDebug(log) << "ProjectImporter::import" << importPath << silent;
QFileInfo fi = importPath.toFileInfo(); QFileInfo fi = importPath.toFileInfo();

View File

@@ -470,7 +470,7 @@ Node *FlatModel::nodeForIndex(const QModelIndex &index) const
const QLoggingCategory &FlatModel::logger() const QLoggingCategory &FlatModel::logger()
{ {
static QLoggingCategory logger("qtc.projectexplorer.flatmodel"); static QLoggingCategory logger("qtc.projectexplorer.flatmodel", QtWarningMsg);
return logger; return logger;
} }

View File

@@ -66,7 +66,7 @@ using namespace Utils;
using namespace ProjectExplorer::Internal; using namespace ProjectExplorer::Internal;
namespace { namespace {
Q_LOGGING_CATEGORY(statesLog, "qtc.projectmanager.states") Q_LOGGING_CATEGORY(statesLog, "qtc.projectmanager.states", QtWarningMsg)
} }
namespace ProjectExplorer { namespace ProjectExplorer {

View File

@@ -27,6 +27,6 @@
namespace QbsProjectManager { namespace QbsProjectManager {
namespace Internal { namespace Internal {
Q_LOGGING_CATEGORY(qbsPmLog, "qtc.qbspm") Q_LOGGING_CATEGORY(qbsPmLog, "qtc.qbspm", QtWarningMsg)
} }
} }

View File

@@ -349,7 +349,7 @@ BaseQtVersion::QmakeBuildConfigs MakeFileParse::effectiveBuildConfig(BaseQtVersi
const QLoggingCategory &MakeFileParse::logging() const QLoggingCategory &MakeFileParse::logging()
{ {
static const QLoggingCategory category("qtc.qmakeprojectmanager.import"); static const QLoggingCategory category("qtc.qmakeprojectmanager.import", QtWarningMsg);
return category; return category;
} }

View File

@@ -96,7 +96,7 @@ private:
namespace QmakeProjectManager { namespace QmakeProjectManager {
Q_LOGGING_CATEGORY(qmakeParse, "qtc.qmake.parsing"); Q_LOGGING_CATEGORY(qmakeParse, "qtc.qmake.parsing", QtWarningMsg);
uint qHash(Variable key, uint seed) { return ::qHash(static_cast<int>(key), seed); } uint qHash(Variable key, uint seed) { return ::qHash(static_cast<int>(key), seed); }

View File

@@ -38,7 +38,7 @@
#include <QTimer> #include <QTimer>
#include <QWidget> #include <QWidget>
static Q_LOGGING_CATEGORY(dragToolInfo, "qtc.qmldesigner.formeditor"); static Q_LOGGING_CATEGORY(dragToolInfo, "qtc.qmldesigner.formeditor", QtWarningMsg);
namespace QmlDesigner { namespace QmlDesigner {

View File

@@ -42,7 +42,7 @@
#include <limits> #include <limits>
static Q_LOGGING_CATEGORY(moveManipulatorInfo, "qtc.qmldesigner.formeditor"); static Q_LOGGING_CATEGORY(moveManipulatorInfo, "qtc.qmldesigner.formeditor", QtWarningMsg);
namespace QmlDesigner { namespace QmlDesigner {

View File

@@ -42,7 +42,7 @@
#include <QPen> #include <QPen>
#include <qdebug.h> #include <qdebug.h>
static Q_LOGGING_CATEGORY(itemlibraryPopulate, "qtc.itemlibrary.populate") static Q_LOGGING_CATEGORY(itemlibraryPopulate, "qtc.itemlibrary.populate", QtWarningMsg)
static bool inline registerItemLibrarySortedModel() { static bool inline registerItemLibrarySortedModel() {
qmlRegisterType<QmlDesigner::ItemLibrarySectionModel>(); qmlRegisterType<QmlDesigner::ItemLibrarySectionModel>();

View File

@@ -49,7 +49,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
static Q_LOGGING_CATEGORY(propertyEditorBenchmark, "qtc.propertyeditor.load") static Q_LOGGING_CATEGORY(propertyEditorBenchmark, "qtc.propertyeditor.load", QtWarningMsg)
static QmlJS::SimpleReaderNode::Ptr s_templateConfiguration = QmlJS::SimpleReaderNode::Ptr(); static QmlJS::SimpleReaderNode::Ptr s_templateConfiguration = QmlJS::SimpleReaderNode::Ptr();

View File

@@ -34,7 +34,7 @@
#include <typeinfo> #include <typeinfo>
static Q_LOGGING_CATEGORY(qmlRewriter, "qtc.rewriter.qmlrewriter") static Q_LOGGING_CATEGORY(qmlRewriter, "qtc.rewriter.qmlrewriter", QtWarningMsg)
using namespace QmlDesigner::Internal; using namespace QmlDesigner::Internal;

View File

@@ -85,7 +85,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static Q_LOGGING_CATEGORY(instanceViewBenchmark, "qtc.nodeinstances.init") static Q_LOGGING_CATEGORY(instanceViewBenchmark, "qtc.nodeinstances.init", QtWarningMsg)
void NodeInstanceServerProxy::showCannotConnectToPuppetWarningAndSwitchToEditMode() void NodeInstanceServerProxy::showCannotConnectToPuppetWarningAndSwitchToEditMode()
{ {

View File

@@ -65,8 +65,8 @@
#include <QThread> #include <QThread>
#include <QSettings> #include <QSettings>
static Q_LOGGING_CATEGORY(puppetStart, "qtc.puppet.start") static Q_LOGGING_CATEGORY(puppetStart, "qtc.puppet.start", QtWarningMsg)
static Q_LOGGING_CATEGORY(puppetBuild, "qtc.puppet.build") static Q_LOGGING_CATEGORY(puppetBuild, "qtc.puppet.build", QtWarningMsg)
namespace QmlDesigner { namespace QmlDesigner {

View File

@@ -64,7 +64,7 @@
using namespace LanguageUtils; using namespace LanguageUtils;
using namespace QmlJS; using namespace QmlJS;
static Q_LOGGING_CATEGORY(rewriterBenchmark, "qtc.rewriter.load") static Q_LOGGING_CATEGORY(rewriterBenchmark, "qtc.rewriter.load", QtWarningMsg)
namespace { namespace {

View File

@@ -52,7 +52,7 @@
namespace QmlDesigner { namespace QmlDesigner {
static Q_LOGGING_CATEGORY(viewBenchmark, "qtc.viewmanager.attach") static Q_LOGGING_CATEGORY(viewBenchmark, "qtc.viewmanager.attach", QtWarningMsg)
class ViewManagerData class ViewManagerData
{ {

View File

@@ -54,7 +54,7 @@
namespace QmlDesigner { namespace QmlDesigner {
Q_LOGGING_CATEGORY(documentManagerLog, "qtc.qtquickdesigner.documentmanager") Q_LOGGING_CATEGORY(documentManagerLog, "qtc.qtquickdesigner.documentmanager", QtWarningMsg)
static inline QmlDesigner::DesignDocument* designDocument() static inline QmlDesigner::DesignDocument* designDocument()
{ {

View File

@@ -70,7 +70,7 @@
#include <QScreen> #include <QScreen>
#include <QWindow> #include <QWindow>
Q_LOGGING_CATEGORY(qmldesignerLog, "qtc.qmldesigner") Q_LOGGING_CATEGORY(qmldesignerLog, "qtc.qmldesigner", QtWarningMsg)
using namespace QmlDesigner::Internal; using namespace QmlDesigner::Internal;

View File

@@ -38,7 +38,7 @@ using namespace ProjectExplorer;
namespace QtSupport { namespace QtSupport {
static QLoggingCategory log("qtc.qscxmlcgenerator"); static QLoggingCategory log("qtc.qscxmlcgenerator", QtWarningMsg);
static const char TaskCategory[] = "Task.Category.ExtraCompiler.QScxmlc"; static const char TaskCategory[] = "Task.Category.ExtraCompiler.QScxmlc";
QScxmlcGenerator::QScxmlcGenerator(const Project *project, QScxmlcGenerator::QScxmlcGenerator(const Project *project,

View File

@@ -43,6 +43,7 @@
#include <QDebug> #include <QDebug>
#include <QDir> #include <QDir>
#include <QLoggingCategory>
#include <QSharedData> #include <QSharedData>
#include <QScopedPointer> #include <QScopedPointer>
#include <QSharedPointer> #include <QSharedPointer>
@@ -57,7 +58,11 @@ using namespace Core;
using namespace Utils; using namespace Utils;
using namespace ProjectExplorer; using namespace ProjectExplorer;
enum { debug = 0, debugRepositorySearch = 0 }; namespace {
Q_LOGGING_CATEGORY(baseLog, "qtc.vcs.base", QtWarningMsg)
Q_LOGGING_CATEGORY(findRepoLog, "qtc.vcs.find-repo", QtWarningMsg)
Q_LOGGING_CATEGORY(stateLog, "qtc.vcs.state", QtWarningMsg)
}
/*! /*!
\namespace VcsBase \namespace VcsBase
@@ -322,6 +327,7 @@ void StateListener::slotStateChanged()
if (!vc) if (!vc)
state.clearPatchFile(); // Need a repository to patch state.clearPatchFile(); // Need a repository to patch
qCDebug(stateLog).noquote() << "VC:" << (vc ? vc->displayName() : QString("None")) << state;
EditorManager::updateWindowTitles(); EditorManager::updateWindowTitles();
emit stateChanged(state, vc); emit stateChanged(state, vc);
} }
@@ -570,11 +576,10 @@ void VcsBasePlugin::extensionsInitialized()
void VcsBasePlugin::slotSubmitEditorAboutToClose(VcsBaseSubmitEditor *submitEditor, bool *result) void VcsBasePlugin::slotSubmitEditorAboutToClose(VcsBaseSubmitEditor *submitEditor, bool *result)
{ {
if (debug) qCDebug(baseLog) << this << "plugin's submit editor" << d->m_submitEditor
qDebug() << this << "plugin's submit editor" << (d->m_submitEditor ? d->m_submitEditor->document()->id().name() : QByteArray())
<< d->m_submitEditor << (d->m_submitEditor ? d->m_submitEditor->document()->id().name() : "")
<< "closing submit editor" << submitEditor << "closing submit editor" << submitEditor
<< (submitEditor ? submitEditor->document()->id().name() : ""); << (submitEditor ? submitEditor->document()->id().name() : QByteArray());
if (submitEditor == d->m_submitEditor) if (submitEditor == d->m_submitEditor)
*result = submitEditorAboutToClose(); *result = submitEditorAboutToClose();
} }
@@ -613,8 +618,7 @@ const VcsBasePluginState &VcsBasePlugin::currentState() const
bool VcsBasePlugin::enableMenuAction(ActionState as, QAction *menuAction) const bool VcsBasePlugin::enableMenuAction(ActionState as, QAction *menuAction) const
{ {
if (debug) qCDebug(baseLog) << "enableMenuAction" << menuAction->text() << as;
qDebug() << "enableMenuAction" << menuAction->text() << as;
switch (as) { switch (as) {
case NoVcsEnabled: { case NoVcsEnabled: {
const bool supportsCreation = d->supportsRepositoryCreation(); const bool supportsCreation = d->supportsRepositoryCreation();
@@ -727,8 +731,7 @@ bool VcsBasePlugin::raiseSubmitEditor() const
QString VcsBasePlugin::findRepositoryForDirectory(const QString &dirS, QString VcsBasePlugin::findRepositoryForDirectory(const QString &dirS,
const QString &checkFile) const QString &checkFile)
{ {
if (debugRepositorySearch) qCDebug(findRepoLog) << ">" << dirS << checkFile;
qDebug() << ">VcsBasePlugin::findRepositoryForDirectory" << dirS << checkFile;
QTC_ASSERT(!dirS.isEmpty() && !checkFile.isEmpty(), return QString()); QTC_ASSERT(!dirS.isEmpty() && !checkFile.isEmpty(), return QString());
const QString root = QDir::rootPath(); const QString root = QDir::rootPath();
@@ -741,13 +744,11 @@ QString VcsBasePlugin::findRepositoryForDirectory(const QString &dirS,
break; break;
if (QFileInfo(directory, checkFile).isFile()) { if (QFileInfo(directory, checkFile).isFile()) {
if (debugRepositorySearch) qCDebug(findRepoLog) << "<" << absDirPath;
qDebug() << "<VcsBasePlugin::findRepositoryForDirectory> " << absDirPath;
return absDirPath; return absDirPath;
} }
} while (!directory.isRoot() && directory.cdUp()); } while (!directory.isRoot() && directory.cdUp());
if (debugRepositorySearch) qCDebug(findRepoLog) << "< bailing out at" << directory.absolutePath();
qDebug() << "<VcsBasePlugin::findRepositoryForDirectory bailing out at " << directory.absolutePath();
return QString(); return QString();
} }

View File

@@ -69,8 +69,6 @@ int main(int argc, char *argv[])
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
qInstallMessageHandler(messageOutput); qInstallMessageHandler(messageOutput);
#endif #endif
QLoggingCategory::setFilterRules(QStringLiteral("qtc.*.debug=false"));
QCoreApplication::setOrganizationName(QStringLiteral("QtProject")); QCoreApplication::setOrganizationName(QStringLiteral("QtProject"));
QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org")); QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org"));
QCoreApplication::setApplicationName(QStringLiteral("ClangBackend")); QCoreApplication::setApplicationName(QStringLiteral("ClangBackend"));

View File

@@ -44,7 +44,7 @@
#include <QDebug> #include <QDebug>
#include <QLoggingCategory> #include <QLoggingCategory>
Q_LOGGING_CATEGORY(serverLog, "qtc.clangbackend.server"); Q_LOGGING_CATEGORY(serverLog, "qtc.clangbackend.server", QtWarningMsg);
static bool useSupportiveTranslationUnit() static bool useSupportiveTranslationUnit()
{ {

View File

@@ -25,7 +25,7 @@
#include "clangiasyncjob.h" #include "clangiasyncjob.h"
Q_LOGGING_CATEGORY(jobsLog, "qtc.clangbackend.jobs"); Q_LOGGING_CATEGORY(jobsLog, "qtc.clangbackend.jobs", QtWarningMsg);
namespace ClangBackEnd { namespace ClangBackEnd {

View File

@@ -35,7 +35,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QUuid> #include <QUuid>
Q_LOGGING_CATEGORY(tuLog, "qtc.clangbackend.translationunits"); Q_LOGGING_CATEGORY(tuLog, "qtc.clangbackend.translationunits", QtWarningMsg);
namespace ClangBackEnd { namespace ClangBackEnd {

View File

@@ -32,7 +32,7 @@
#include <QLoggingCategory> #include <QLoggingCategory>
static Q_LOGGING_CATEGORY(verboseLibLog, "qtc.clangbackend.verboselib"); static Q_LOGGING_CATEGORY(verboseLibLog, "qtc.clangbackend.verboselib", QtWarningMsg);
static bool isVerboseModeEnabled() static bool isVerboseModeEnabled()
{ {

View File

@@ -184,8 +184,6 @@ struct Data // because we have a cycle dependency
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
try { try {
//QLoggingCategory::setFilterRules(QStringLiteral("*.debug=false"));
QCoreApplication::setOrganizationName(QStringLiteral("QtProject")); QCoreApplication::setOrganizationName(QStringLiteral("QtProject"));
QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org")); QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org"));
QCoreApplication::setApplicationName(QStringLiteral("ClangPchManagerBackend")); QCoreApplication::setApplicationName(QStringLiteral("ClangPchManagerBackend"));

View File

@@ -100,8 +100,6 @@ struct Data // because we have a cycle dependency
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
try { try {
//QLoggingCategory::setFilterRules(QStringLiteral("*.debug=false"));
QCoreApplication::setOrganizationName(QStringLiteral("QtProject")); QCoreApplication::setOrganizationName(QStringLiteral("QtProject"));
QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org")); QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org"));
QCoreApplication::setApplicationName(QStringLiteral("ClangRefactoringBackend")); QCoreApplication::setApplicationName(QStringLiteral("ClangRefactoringBackend"));

View File

@@ -76,7 +76,6 @@ static QString pluginFolder(const QLatin1String &folder)
void tst_PluginManager::init() void tst_PluginManager::init()
{ {
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
m_pm = new PluginManager; m_pm = new PluginManager;
m_pm->setPluginIID(QLatin1String("plugin")); m_pm->setPluginIID(QLatin1String("plugin"));
m_objectAdded = new QSignalSpy(m_pm, SIGNAL(objectAdded(QObject*))); m_objectAdded = new QSignalSpy(m_pm, SIGNAL(objectAdded(QObject*)));

View File

@@ -90,7 +90,6 @@ private:
void tst_PluginSpec::init() void tst_PluginSpec::init()
{ {
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
QVERIFY(QDir::setCurrent(QLatin1String(PLUGINSPEC_DIR))); QVERIFY(QDir::setCurrent(QLatin1String(PLUGINSPEC_DIR)));
} }

View File

@@ -112,7 +112,6 @@ private:
void tst_Dependencies::initTestCase() void tst_Dependencies::initTestCase()
{ {
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
m_path = QLatin1Literal(TESTSRCDIR "/samples"); m_path = QLatin1Literal(TESTSRCDIR "/samples");
m_basePaths.append(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)); m_basePaths.append(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath));

View File

@@ -100,7 +100,6 @@ QString resourcePath()
void tst_ImportCheck::initTestCase() void tst_ImportCheck::initTestCase()
{ {
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
if (!ModelManagerInterface::instance()) if (!ModelManagerInterface::instance())
new ModelManagerInterface; new ModelManagerInterface;

View File

@@ -681,7 +681,7 @@ void extremeFunction3(int parameter1,
// Misc // Misc
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.builtineditordocumentprocessor") static Q_LOGGING_CATEGORY(log, "qtc.cpptools.builtineditordocumentprocessor", QtWarningMsg)
int hello; // NOTE: Ops, awkward placement of next token after Q_LOGGING_CATEGORY (semicolon helps) int hello; // NOTE: Ops, awkward placement of next token after Q_LOGGING_CATEGORY (semicolon helps)

View File

@@ -45,8 +45,6 @@ int main(int argc, char *argv[])
QCoreApplication application(argc, argv); QCoreApplication application(argc, argv);
QLoggingCategory::setFilterRules(QStringLiteral("*.info=false\n*.debug=false\n*.warning=true"));
testing::InitGoogleTest(&argc, argv); testing::InitGoogleTest(&argc, argv);
#ifdef WITH_BENCHMARKS #ifdef WITH_BENCHMARKS
benchmark::Initialize(&argc, argv); benchmark::Initialize(&argc, argv);