forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.8'
Change-Id: I0ff6f659b7ccd4ff5a79e422a1d54488508fe05f
This commit is contained in:
@@ -222,8 +222,10 @@
|
||||
|
||||
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
|
||||
\uicontrol {Git Branches} sidebar view. Double-click local branch names to
|
||||
edit them.
|
||||
\uicontrol {Git Branches} sidebar view.
|
||||
|
||||
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
|
||||
(\uicontrol Refresh).
|
||||
@@ -244,7 +246,7 @@
|
||||
\li Remove a local branch. You cannot delete remote branches.
|
||||
\row
|
||||
\li \uicontrol Rename
|
||||
\li Rename a local branch.
|
||||
\li Rename a local branch. You cannot rename remote branches.
|
||||
\row
|
||||
\li \uicontrol{Checkout}
|
||||
\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.
|
||||
\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
|
||||
|
||||
Only graphical merge tools are supported. You can configure the
|
||||
|
@@ -457,7 +457,7 @@ class Dumper(DumperBase):
|
||||
self.listMembers(value, nativeType)
|
||||
tdata.templateArguments = self.listTemplateParametersHelper(nativeType)
|
||||
elif code == lldb.eTypeClassFunction:
|
||||
tdata.code = TypeCodeFunction,
|
||||
tdata.code = TypeCodeFunction
|
||||
elif code == lldb.eTypeClassMemberPointer:
|
||||
tdata.code = TypeCodeMemberPointer
|
||||
|
||||
@@ -649,6 +649,21 @@ class Dumper(DumperBase):
|
||||
def isMsvcTarget(self):
|
||||
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):
|
||||
for func in self.target.FindFunctions('qVersion'):
|
||||
name = func.GetSymbol().GetName()
|
||||
|
@@ -414,8 +414,6 @@ int main(int argc, char **argv)
|
||||
|
||||
Utils::TemporaryDirectory::setMasterTemporaryDirectory(QDir::tempPath() + "/" + Core::Constants::IDE_CASED_ID + "-XXXXXX");
|
||||
|
||||
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false\nqtc.*.info=false"));
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
// increase the number of file that can be opened in Qt Creator.
|
||||
struct rlimit rl;
|
||||
|
@@ -33,9 +33,14 @@ msvc: BOTAN_CXX_FLAGS += /wd4100 /wd4800 /wd4127 /wd4244 /wd4250 /wd4267 /wd4334
|
||||
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)
|
||||
unix: BOTAN_CXX_FLAGS += -fPIC
|
||||
!isEmpty(BOTAN_CXX_FLAGS): OTHER_FLAGS += --cxxflags=$$shell_quote($$BOTAN_CXX_FLAGS)
|
||||
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_inputs = $$BOTAN_SOURCE_DIR/configure.py
|
||||
|
@@ -42,7 +42,8 @@ Product {
|
||||
+ "sha2_32,sha2_32_x86,sha2_64,simd,system_rng,emsa_pkcs1,pbes2,pbkdf2";
|
||||
args.push("--enable-modules=" + modules);
|
||||
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",
|
||||
"/wd4334", "/wd4702", "/wd4996", "/D_ENABLE_EXTENDED_ALIGNED_STORAGE");
|
||||
}
|
||||
@@ -55,10 +56,11 @@ Product {
|
||||
}
|
||||
if (product.qbs.targetOS.contains("unix"))
|
||||
cxxFlags.push("-fPIC");
|
||||
if (product.qbs.buildVariant === "release")
|
||||
cxxFlags.push(tc.contains("msvc") ? "/O2" : "-O3");
|
||||
if (cxxFlags.length > 0)
|
||||
args.push("--cxxflags=" + cxxFlags.join(" "));
|
||||
var ccOption = "--cc=";
|
||||
var tc = product.qbs.toolchain;
|
||||
if (tc.contains("msvc"))
|
||||
ccOption += "msvc";
|
||||
else if (tc.contains("clang"))
|
||||
|
@@ -37,7 +37,7 @@
|
||||
|
||||
namespace {
|
||||
|
||||
Q_LOGGING_CATEGORY(timersLog, "qtc.clangbackend.timers");
|
||||
Q_LOGGING_CATEGORY(timersLog, "qtc.clangbackend.timers", QtWarningMsg);
|
||||
|
||||
class DebugInspectionDir : public QTemporaryDir
|
||||
{
|
||||
|
@@ -61,7 +61,7 @@
|
||||
|
||||
#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_FORCEENABLED_PLUGINS[] = "Plugins/ForceEnabled";
|
||||
|
@@ -30,7 +30,7 @@
|
||||
#include <QTextBlock>
|
||||
#include <QTextDocument>
|
||||
|
||||
static Q_LOGGING_CATEGORY(formatterLog, "qtc.qmljs.formatter")
|
||||
static Q_LOGGING_CATEGORY(formatterLog, "qtc.qmljs.formatter", QtWarningMsg)
|
||||
|
||||
namespace QmlJS {
|
||||
|
||||
|
@@ -40,7 +40,7 @@ enum {
|
||||
debug = false
|
||||
};
|
||||
|
||||
static Q_LOGGING_CATEGORY(iconsLog, "qtc.qmljs.icons")
|
||||
static Q_LOGGING_CATEGORY(iconsLog, "qtc.qmljs.icons", QtWarningMsg)
|
||||
|
||||
namespace QmlJS {
|
||||
|
||||
|
@@ -35,7 +35,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
static Q_LOGGING_CATEGORY(importsLog, "qtc.qmljs.imports")
|
||||
static Q_LOGGING_CATEGORY(importsLog, "qtc.qmljs.imports", QtWarningMsg)
|
||||
|
||||
namespace QmlJS {
|
||||
|
||||
|
@@ -54,7 +54,7 @@
|
||||
|
||||
namespace QmlJS {
|
||||
|
||||
QMLJS_EXPORT Q_LOGGING_CATEGORY(qmljsLog, "qtc.qmljs.common")
|
||||
QMLJS_EXPORT Q_LOGGING_CATEGORY(qmljsLog, "qtc.qmljs.common", QtWarningMsg)
|
||||
|
||||
/*!
|
||||
\class QmlJS::ModelManagerInterface
|
||||
|
@@ -34,7 +34,7 @@
|
||||
#include <QFile>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
static Q_LOGGING_CATEGORY(simpleReaderLog, "qtc.qmljs.simpleReader")
|
||||
static Q_LOGGING_CATEGORY(simpleReaderLog, "qtc.qmljs.simpleReader", QtWarningMsg)
|
||||
|
||||
namespace QmlJS{
|
||||
|
||||
|
@@ -27,6 +27,6 @@
|
||||
|
||||
namespace QSsh {
|
||||
namespace Internal {
|
||||
Q_LOGGING_CATEGORY(sshLog, "qtc.ssh")
|
||||
Q_LOGGING_CATEGORY(sshLog, "qtc.ssh", QtWarningMsg)
|
||||
} // namespace Internal
|
||||
} // namespace QSsh
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#include <QLoggingCategory>
|
||||
#include <QTimer>
|
||||
|
||||
static Q_LOGGING_CATEGORY(benchmarksLog, "qtc.benchmark");
|
||||
static Q_LOGGING_CATEGORY(benchmarksLog, "qtc.benchmark", QtWarningMsg);
|
||||
|
||||
namespace Utils {
|
||||
|
||||
|
@@ -37,7 +37,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(finderLog, "qtc.utils.fileinprojectfinder");
|
||||
Q_LOGGING_CATEGORY(finderLog, "qtc.utils.fileinprojectfinder", QtWarningMsg);
|
||||
}
|
||||
|
||||
namespace Utils {
|
||||
|
@@ -42,7 +42,7 @@
|
||||
#include <functional>
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(avdManagerLog, "qtc.android.avdManager")
|
||||
Q_LOGGING_CATEGORY(avdManagerLog, "qtc.android.avdManager", QtWarningMsg)
|
||||
}
|
||||
|
||||
namespace Android {
|
||||
|
@@ -68,7 +68,7 @@ using namespace ProjectExplorer;
|
||||
using namespace Android::Internal;
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(buildapkstepLog, "qtc.android.build.androidbuildapkstep")
|
||||
Q_LOGGING_CATEGORY(buildapkstepLog, "qtc.android.build.androidbuildapkstep", QtWarningMsg)
|
||||
}
|
||||
|
||||
namespace Android {
|
||||
|
@@ -77,7 +77,7 @@ using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(avdConfigLog, "qtc.android.androidconfig")
|
||||
Q_LOGGING_CATEGORY(avdConfigLog, "qtc.android.androidconfig", QtWarningMsg)
|
||||
}
|
||||
|
||||
namespace Android {
|
||||
|
@@ -48,7 +48,7 @@
|
||||
#include <QHostAddress>
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(androidDebugSupportLog, "qtc.android.run.androiddebugsupport")
|
||||
Q_LOGGING_CATEGORY(androidDebugSupportLog, "qtc.android.run.androiddebugsupport", QtWarningMsg)
|
||||
}
|
||||
|
||||
using namespace Debugger;
|
||||
|
@@ -64,7 +64,7 @@ using namespace Android;
|
||||
using namespace Android::Internal;
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(deployStepLog, "qtc.android.build.androiddeployqtstep")
|
||||
Q_LOGGING_CATEGORY(deployStepLog, "qtc.android.build.androiddeployqtstep", QtWarningMsg)
|
||||
}
|
||||
|
||||
const QLatin1String UninstallPreviousPackageKey("UninstallPreviousPackage");
|
||||
|
@@ -39,7 +39,7 @@
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(androidDeviceLog, "qtc.android.build.androiddevice")
|
||||
Q_LOGGING_CATEGORY(androidDeviceLog, "qtc.android.build.androiddevice", QtWarningMsg)
|
||||
}
|
||||
|
||||
namespace Android {
|
||||
|
@@ -75,7 +75,7 @@ namespace {
|
||||
const QString apkVersionRegEx("(?<token>package: )(.*?)(versionCode=)'(?<target>.*?)'");
|
||||
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 ®Ex) {
|
||||
const QRegularExpression regRx(regEx,
|
||||
|
@@ -45,7 +45,7 @@
|
||||
#include <QLoggingCategory>
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(androidRunnerLog, "qtc.android.run.androidrunner")
|
||||
Q_LOGGING_CATEGORY(androidRunnerLog, "qtc.android.run.androidrunner", QtWarningMsg)
|
||||
}
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
|
@@ -52,7 +52,7 @@
|
||||
#include <chrono>
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(androidRunWorkerLog, "qtc.android.run.androidrunnerworker")
|
||||
Q_LOGGING_CATEGORY(androidRunWorkerLog, "qtc.android.run.androidrunnerworker", QtWarningMsg)
|
||||
}
|
||||
|
||||
using namespace std;
|
||||
|
@@ -41,7 +41,7 @@
|
||||
#include <QSettings>
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(sdkManagerLog, "qtc.android.sdkManager")
|
||||
Q_LOGGING_CATEGORY(sdkManagerLog, "qtc.android.sdkManager", QtWarningMsg)
|
||||
}
|
||||
|
||||
namespace Android {
|
||||
|
@@ -44,7 +44,7 @@
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(androidSdkMgrUiLog, "qtc.android.sdkManagerUi")
|
||||
Q_LOGGING_CATEGORY(androidSdkMgrUiLog, "qtc.android.sdkManagerUi", QtWarningMsg)
|
||||
}
|
||||
|
||||
namespace Android {
|
||||
|
@@ -35,7 +35,7 @@
|
||||
#include <QLoggingCategory>
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(androidToolLog, "qtc.android.sdkManager")
|
||||
Q_LOGGING_CATEGORY(androidToolLog, "qtc.android.sdkManager", QtWarningMsg)
|
||||
}
|
||||
|
||||
namespace Android {
|
||||
|
@@ -49,7 +49,7 @@
|
||||
#include <QFutureInterface>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.testcodeparser")
|
||||
static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.testcodeparser", QtWarningMsg)
|
||||
|
||||
namespace Autotest {
|
||||
namespace Internal {
|
||||
|
@@ -41,7 +41,7 @@
|
||||
|
||||
#include <QLoggingCategory>
|
||||
|
||||
static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.testconfiguration")
|
||||
static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.testconfiguration", QtWarningMsg)
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
|
@@ -40,7 +40,7 @@
|
||||
#include <QLoggingCategory>
|
||||
#include <QSettings>
|
||||
|
||||
static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.frameworkmanager")
|
||||
static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.frameworkmanager", QtWarningMsg)
|
||||
|
||||
namespace Autotest {
|
||||
namespace Internal {
|
||||
|
@@ -28,7 +28,7 @@
|
||||
namespace ClangCodeModel {
|
||||
namespace Internal {
|
||||
|
||||
Q_LOGGING_CATEGORY(ipcLog, "qtc.clangcodemodel.ipc")
|
||||
Q_LOGGING_CATEGORY(ipcLog, "qtc.clangcodemodel.ipc", QtWarningMsg)
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ClangCodeModel
|
||||
|
@@ -193,10 +193,11 @@ void BackendReceiver::completions(const CompletionsMessage &message)
|
||||
|
||||
void BackendReceiver::annotations(const AnnotationsMessage &message)
|
||||
{
|
||||
qCDebugIpc() << "AnnotationsMessage with"
|
||||
<< message.diagnostics.size() << "diagnostics"
|
||||
<< message.tokenInfos.size() << "highlighting marks"
|
||||
<< message.skippedPreprocessorRanges.size() << "skipped preprocessor ranges";
|
||||
qCDebugIpc() << "AnnotationsMessage"
|
||||
<< "for" << QFileInfo(message.fileContainer.filePath).fileName() << "with"
|
||||
<< message.diagnostics.size() << "diagnostics" << message.tokenInfos.size()
|
||||
<< "token infos" << message.skippedPreprocessorRanges.size()
|
||||
<< "skipped preprocessor ranges";
|
||||
|
||||
auto processor = ClangEditorDocumentProcessor::get(message.fileContainer.filePath);
|
||||
if (!processor)
|
||||
|
@@ -40,7 +40,7 @@
|
||||
#include <QTextCodec>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
Q_LOGGING_CATEGORY(hoverLog, "qtc.clangcodemodel.hover");
|
||||
Q_LOGGING_CATEGORY(hoverLog, "qtc.clangcodemodel.hover", QtWarningMsg);
|
||||
|
||||
using namespace TextEditor;
|
||||
|
||||
|
@@ -61,7 +61,7 @@ using namespace ClangCodeModel;
|
||||
using namespace ClangCodeModel::Internal;
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
static Q_LOGGING_CATEGORY(debug, "qtc.clangcodemodel.batch");
|
||||
static Q_LOGGING_CATEGORY(debug, "qtc.clangcodemodel.batch", QtWarningMsg);
|
||||
|
||||
static int timeOutFromEnvironmentVariable()
|
||||
{
|
||||
|
@@ -35,7 +35,7 @@
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
Q_LOGGING_CATEGORY(fixitsLog, "qtc.clangtools.fixits");
|
||||
Q_LOGGING_CATEGORY(fixitsLog, "qtc.clangtools.fixits", QtWarningMsg);
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
|
@@ -37,7 +37,7 @@
|
||||
#include <QDir>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runner")
|
||||
static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runner", QtWarningMsg)
|
||||
|
||||
namespace ClangTools {
|
||||
namespace Internal {
|
||||
|
@@ -70,7 +70,7 @@ using namespace CppTools;
|
||||
using namespace ProjectExplorer;
|
||||
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)
|
||||
{
|
||||
|
@@ -38,7 +38,7 @@
|
||||
#include <QFileInfo>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runner")
|
||||
static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runner", QtWarningMsg)
|
||||
|
||||
namespace ClangTools {
|
||||
namespace Internal {
|
||||
|
@@ -60,7 +60,7 @@ int distance(const FileName &targetDirectory, const FileName &fileName)
|
||||
// compiler flags
|
||||
void CMakeCbpParser::sortFiles()
|
||||
{
|
||||
QLoggingCategory log("qtc.cmakeprojectmanager.filetargetmapping");
|
||||
QLoggingCategory log("qtc.cmakeprojectmanager.filetargetmapping", QtWarningMsg);
|
||||
FileNameList fileNames = transform<QList>(m_fileList, &FileNode::filePath);
|
||||
|
||||
sort(fileNames);
|
||||
|
@@ -50,7 +50,7 @@ using namespace QtSupport;
|
||||
|
||||
namespace {
|
||||
|
||||
Q_LOGGING_CATEGORY(cmInputLog, "qtc.cmake.import");
|
||||
Q_LOGGING_CATEGORY(cmInputLog, "qtc.cmake.import", QtWarningMsg);
|
||||
|
||||
struct CMakeToolChainData
|
||||
{
|
||||
|
@@ -57,7 +57,7 @@ const char HANDSHAKE_TYPE[] = "handshake";
|
||||
const char START_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:
|
||||
|
@@ -65,7 +65,7 @@
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
|
||||
Q_LOGGING_CATEGORY(log, "qtc.core.documentmanager")
|
||||
Q_LOGGING_CATEGORY(log, "qtc.core.documentmanager", QtWarningMsg)
|
||||
|
||||
/*!
|
||||
\class Core::DocumentManager
|
||||
|
@@ -47,7 +47,7 @@
|
||||
#include <QLoggingCategory>
|
||||
#include <QTextBlock>
|
||||
|
||||
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.builtineditordocumentprocessor")
|
||||
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.builtineditordocumentprocessor", QtWarningMsg)
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -42,7 +42,7 @@ enum { debug = 0 };
|
||||
using namespace CPlusPlus;
|
||||
using namespace CppTools;
|
||||
|
||||
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.semanticinfoupdater")
|
||||
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.semanticinfoupdater", QtWarningMsg)
|
||||
|
||||
namespace CppTools {
|
||||
|
||||
|
@@ -58,7 +58,7 @@ using namespace CppTools::Internal;
|
||||
|
||||
typedef Document::DiagnosticMessage Message;
|
||||
|
||||
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.sourceprocessor")
|
||||
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.sourceprocessor", QtWarningMsg)
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -73,7 +73,7 @@ GeneratedCodeModelSupport::GeneratedCodeModelSupport(CppModelManager *modelmanag
|
||||
CppTools::AbstractEditorSupport(modelmanager, generator), m_generatedFileName(generatedFile),
|
||||
m_generator(generator)
|
||||
{
|
||||
QLoggingCategory log("qtc.cpptools.generatedcodemodelsupport");
|
||||
QLoggingCategory log("qtc.cpptools.generatedcodemodelsupport", QtWarningMsg);
|
||||
qCDebug(log) << "ctor GeneratedCodeModelSupport for" << m_generator->source()
|
||||
<< generatedFile;
|
||||
|
||||
@@ -86,7 +86,7 @@ GeneratedCodeModelSupport::~GeneratedCodeModelSupport()
|
||||
{
|
||||
CppTools::CppModelManager::instance()->emitAbstractEditorSupportRemoved(
|
||||
m_generatedFileName.toString());
|
||||
QLoggingCategory log("qtc.cpptools.generatedcodemodelsupport");
|
||||
QLoggingCategory log("qtc.cpptools.generatedcodemodelsupport", QtWarningMsg);
|
||||
qCDebug(log) << "dtor ~generatedcodemodelsupport for" << m_generatedFileName;
|
||||
}
|
||||
|
||||
|
@@ -40,7 +40,7 @@ using namespace TextEditor;
|
||||
using SemanticHighlighter::incrementalApplyExtraAdditionalFormats;
|
||||
using SemanticHighlighter::clearExtraAdditionalFormatsUntilEnd;
|
||||
|
||||
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.semantichighlighter")
|
||||
static Q_LOGGING_CATEGORY(log, "qtc.cpptools.semantichighlighter", QtWarningMsg)
|
||||
|
||||
namespace CppTools {
|
||||
|
||||
|
@@ -1557,8 +1557,11 @@ bool BreakHandler::setData(const QModelIndex &idx, const QVariant &value, int ro
|
||||
const bool isEnabled = (bps.isEmpty() && sbps.isEmpty())
|
||||
|| (!bps.isEmpty() && bps.at(0)->isEnabled())
|
||||
|| (!sbps.isEmpty() && sbps.at(0)->params.enabled);
|
||||
for (Breakpoint bp : bps)
|
||||
for (Breakpoint bp : bps) {
|
||||
requestBreakpointEnabling(bp, !isEnabled);
|
||||
if (GlobalBreakpoint gbp = bp->globalBreakpoint())
|
||||
gbp->setEnabled(!isEnabled, false);
|
||||
}
|
||||
for (SubBreakpoint sbp : sbps)
|
||||
requestSubBreakpointEnabling(sbp, !isEnabled);
|
||||
return true;
|
||||
@@ -1642,8 +1645,11 @@ bool BreakHandler::contextMenuEvent(const ItemViewEvent &ev)
|
||||
: breakpointsEnabled ? tr("Disable Breakpoint") : tr("Enable Breakpoint"),
|
||||
!selectedBreakpoints.isEmpty(),
|
||||
[this, selectedBreakpoints, breakpointsEnabled] {
|
||||
for (Breakpoint bp : selectedBreakpoints)
|
||||
for (Breakpoint bp : selectedBreakpoints) {
|
||||
requestBreakpointEnabling(bp, !breakpointsEnabled);
|
||||
if (GlobalBreakpoint gbp = bp->globalBreakpoint())
|
||||
gbp->setEnabled(!breakpointsEnabled, false);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -2311,18 +2317,20 @@ void GlobalBreakpointItem::updateMarker()
|
||||
m_marker->setToolTip(toolTip());
|
||||
}
|
||||
|
||||
void GlobalBreakpointItem::setEnabled(bool enabled)
|
||||
void GlobalBreakpointItem::setEnabled(bool enabled, bool descend)
|
||||
{
|
||||
QTC_CHECK(m_params.enabled != enabled);
|
||||
m_params.enabled = enabled;
|
||||
updateMarkerIcon();
|
||||
update();
|
||||
|
||||
for (QPointer<DebuggerEngine> engine : EngineManager::engines()) {
|
||||
BreakHandler *handler = engine->breakHandler();
|
||||
for (Breakpoint bp : handler->breakpoints()) {
|
||||
if (bp->globalBreakpoint() == this)
|
||||
handler->requestBreakpointEnabling(bp, enabled);
|
||||
if (descend) {
|
||||
for (QPointer<DebuggerEngine> engine : EngineManager::engines()) {
|
||||
BreakHandler *handler = engine->breakHandler();
|
||||
for (Breakpoint bp : handler->breakpoints()) {
|
||||
if (bp->globalBreakpoint() == this)
|
||||
handler->requestBreakpointEnabling(bp, enabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -85,7 +85,7 @@ public:
|
||||
int modelId() const;
|
||||
|
||||
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; }
|
||||
|
||||
|
@@ -59,7 +59,7 @@ using namespace QmlDebug::Constants;
|
||||
namespace Debugger {
|
||||
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.
|
||||
|
@@ -239,8 +239,7 @@ void UnstartedAppWatcherDialog::pidFound(const DeviceProcessItem &p)
|
||||
void UnstartedAppWatcherDialog::startStopWatching(bool start)
|
||||
{
|
||||
setWaitingState(start ? WatchingState : NotWatchingState);
|
||||
m_watchingPushButton->setText(start ? QLatin1String("Stop Watching")
|
||||
: QLatin1String("Start Watching"));
|
||||
m_watchingPushButton->setText(start ? tr("Stop Watching") : tr("Start Watching"));
|
||||
startStopTimer(start);
|
||||
}
|
||||
|
||||
|
@@ -166,12 +166,10 @@ void BranchView::slotCustomContextMenu(const QPoint &point)
|
||||
return;
|
||||
|
||||
const QModelIndex currentBranch = m_model->currentBranch();
|
||||
const bool hasSelection = index.isValid();
|
||||
const bool currentSelected = hasSelection && index == currentBranch;
|
||||
const bool currentSelected = index.row() == currentBranch.row();
|
||||
const bool isLocal = m_model->isLocal(index);
|
||||
const bool isLeaf = m_model->isLeaf(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);
|
||||
|
||||
QMenu contextMenu;
|
||||
|
@@ -47,7 +47,7 @@ namespace Ios {
|
||||
namespace Internal {
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(iosSettingsLog, "qtc.ios.common")
|
||||
Q_LOGGING_CATEGORY(iosSettingsLog, "qtc.ios.common", QtWarningMsg)
|
||||
}
|
||||
|
||||
static const int IdentifierRole = Qt::UserRole+1;
|
||||
|
@@ -71,8 +71,8 @@ using namespace Utils;
|
||||
using namespace Debugger;
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(kitSetupLog, "qtc.ios.kitSetup")
|
||||
Q_LOGGING_CATEGORY(iosCommonLog, "qtc.ios.common")
|
||||
Q_LOGGING_CATEGORY(kitSetupLog, "qtc.ios.kitSetup", QtWarningMsg)
|
||||
Q_LOGGING_CATEGORY(iosCommonLog, "qtc.ios.common", QtWarningMsg)
|
||||
}
|
||||
|
||||
using ToolChainPair = std::pair<ClangToolChain *, ClangToolChain *>;
|
||||
|
@@ -49,7 +49,7 @@
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(detectLog, "qtc.ios.deviceDetect")
|
||||
Q_LOGGING_CATEGORY(detectLog, "qtc.ios.deviceDetect", QtWarningMsg)
|
||||
}
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
|
@@ -53,7 +53,7 @@ using namespace QtSupport;
|
||||
namespace Ios {
|
||||
namespace Internal {
|
||||
|
||||
Q_LOGGING_CATEGORY(iosLog, "qtc.ios.common")
|
||||
Q_LOGGING_CATEGORY(iosLog, "qtc.ios.common", QtWarningMsg)
|
||||
|
||||
class IosPluginPrivate
|
||||
{
|
||||
|
@@ -33,7 +33,7 @@
|
||||
#include <QLoggingCategory>
|
||||
#include <QProcess>
|
||||
|
||||
static Q_LOGGING_CATEGORY(probeLog, "qtc.ios.probe")
|
||||
static Q_LOGGING_CATEGORY(probeLog, "qtc.ios.probe", QtWarningMsg)
|
||||
|
||||
namespace Ios {
|
||||
|
||||
|
@@ -58,7 +58,7 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
static Q_LOGGING_CATEGORY(toolHandlerLog, "qtc.ios.toolhandler")
|
||||
static Q_LOGGING_CATEGORY(toolHandlerLog, "qtc.ios.toolhandler", QtWarningMsg)
|
||||
|
||||
namespace Ios {
|
||||
|
||||
|
@@ -47,7 +47,7 @@
|
||||
using namespace std;
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(simulatorLog, "qtc.ios.simulator")
|
||||
Q_LOGGING_CATEGORY(simulatorLog, "qtc.ios.simulator", QtWarningMsg)
|
||||
}
|
||||
|
||||
namespace Ios {
|
||||
|
@@ -34,7 +34,7 @@
|
||||
#include <QPushButton>
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(iosCommon, "qtc.ios.common")
|
||||
Q_LOGGING_CATEGORY(iosCommon, "qtc.ios.common", QtWarningMsg)
|
||||
}
|
||||
|
||||
namespace Ios {
|
||||
|
@@ -58,8 +58,8 @@ using namespace Utils;
|
||||
|
||||
namespace LanguageClient {
|
||||
|
||||
static Q_LOGGING_CATEGORY(LOGLSPCLIENT, "qtc.languageclient.client");
|
||||
static Q_LOGGING_CATEGORY(LOGLSPCLIENTV, "qtc.languageclient.messages");
|
||||
static Q_LOGGING_CATEGORY(LOGLSPCLIENT, "qtc.languageclient.client", QtWarningMsg);
|
||||
static Q_LOGGING_CATEGORY(LOGLSPCLIENTV, "qtc.languageclient.messages", QtWarningMsg);
|
||||
|
||||
BaseClient::BaseClient()
|
||||
: 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);
|
||||
}
|
||||
|
||||
bool BaseClient::needsRestart(const BaseSettings *) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool BaseClient::reset()
|
||||
{
|
||||
if (!m_restartsLeft)
|
||||
@@ -756,10 +761,15 @@ StdIOClient::~StdIOClient()
|
||||
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()
|
||||
{
|
||||
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());
|
||||
return false;
|
||||
}
|
||||
@@ -771,11 +781,6 @@ void StdIOClient::setWorkingDirectory(const QString &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)
|
||||
{
|
||||
if (m_process.state() != QProcess::Running) {
|
||||
|
@@ -112,8 +112,9 @@ public:
|
||||
|
||||
Core::Id id() const { return m_id; }
|
||||
|
||||
bool needsRestart(const BaseSettings *) const;
|
||||
|
||||
virtual bool start() { return true; }
|
||||
virtual bool matches(const BaseSettings * /*setting*/) { return false; }
|
||||
virtual bool reset();
|
||||
|
||||
void log(const QString &message,
|
||||
@@ -175,12 +176,12 @@ public:
|
||||
StdIOClient &operator=(const StdIOClient &) = delete;
|
||||
StdIOClient &operator=(StdIOClient &&) = delete;
|
||||
|
||||
bool needsRestart(const StdIOSettings *settings);
|
||||
|
||||
bool start() override;
|
||||
|
||||
void setWorkingDirectory(const QString &workingDirectory);
|
||||
|
||||
bool matches(const BaseSettings *setting) override;
|
||||
|
||||
protected:
|
||||
void sendData(const QByteArray &data) final;
|
||||
QProcess m_process;
|
||||
|
@@ -43,7 +43,7 @@
|
||||
#include <QTextDocument>
|
||||
#include <QTime>
|
||||
|
||||
static Q_LOGGING_CATEGORY(LOGLSPCOMPLETION, "qtc.languageclient.completion");
|
||||
static Q_LOGGING_CATEGORY(LOGLSPCOMPLETION, "qtc.languageclient.completion", QtWarningMsg);
|
||||
|
||||
using namespace LanguageServerProtocol;
|
||||
|
||||
|
@@ -167,6 +167,7 @@ void LanguageClientManager::removeMarks(const Core::Id &id)
|
||||
|
||||
void LanguageClientManager::startClient(BaseClient *client)
|
||||
{
|
||||
QTC_ASSERT(client, return);
|
||||
if (managerInstance->m_shuttingDown) {
|
||||
managerInstance->clientFinished(client);
|
||||
return;
|
||||
@@ -214,8 +215,12 @@ void LanguageClientManager::shutdown()
|
||||
if (managerInstance->m_shuttingDown)
|
||||
return;
|
||||
managerInstance->m_shuttingDown = true;
|
||||
for (auto interface : managerInstance->m_clients)
|
||||
interface->shutdown();
|
||||
for (auto interface : managerInstance->m_clients) {
|
||||
if (interface->reachable())
|
||||
interface->shutdown();
|
||||
else
|
||||
deleteClient(interface);
|
||||
}
|
||||
}
|
||||
|
||||
LanguageClientManager *LanguageClientManager::instance()
|
||||
|
@@ -23,8 +23,10 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "languageclientmanager.h"
|
||||
#include "languageclientsettings.h"
|
||||
|
||||
#include "baseclient.h"
|
||||
#include "languageclientmanager.h"
|
||||
#include "languageclient_global.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
@@ -71,8 +73,9 @@ public:
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
|
||||
void reset(const QList<BaseSettings *> &settings);
|
||||
QList<BaseSettings *> settings() const { return m_settings; }
|
||||
void reset(const QList<StdIOSettings *> &settings);
|
||||
QList<StdIOSettings *> settings() const { return m_settings; }
|
||||
QList<StdIOSettings *> removed() const { return m_removed; }
|
||||
|
||||
enum Columns {
|
||||
DisplayNameColumn = 0,
|
||||
@@ -84,7 +87,8 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
QList<BaseSettings *> m_settings; // owned
|
||||
QList<StdIOSettings *> m_settings; // owned
|
||||
QList<StdIOSettings *> m_removed;
|
||||
};
|
||||
|
||||
class LanguageClientSettingsPageWidget : public QWidget
|
||||
@@ -115,7 +119,7 @@ public:
|
||||
|
||||
private:
|
||||
LanguageClientSettingsModel m_model;
|
||||
QList<BaseSettings *> m_settings; // owned
|
||||
QList<StdIOSettings *> m_settings; // owned
|
||||
QPointer<LanguageClientSettingsPageWidget> m_widget;
|
||||
};
|
||||
|
||||
@@ -216,6 +220,7 @@ void LanguageClientSettingsPage::init()
|
||||
{
|
||||
m_model.reset(LanguageClientSettings::fromSettings(Core::ICore::settings()));
|
||||
apply();
|
||||
finish();
|
||||
}
|
||||
|
||||
QWidget *LanguageClientSettingsPage::widget()
|
||||
@@ -228,43 +233,33 @@ QWidget *LanguageClientSettingsPage::widget()
|
||||
void LanguageClientSettingsPage::apply()
|
||||
{
|
||||
qDeleteAll(m_settings);
|
||||
m_settings = Utils::transform(m_model.settings(), [](const BaseSettings *other){
|
||||
return new BaseSettings(*other);
|
||||
m_settings = Utils::transform(m_model.settings(), [](const StdIOSettings *other){
|
||||
return dynamic_cast<StdIOSettings *>(other->copy());
|
||||
});
|
||||
LanguageClientSettings::toSettings(Core::ICore::settings(), m_settings);
|
||||
|
||||
const QVector<BaseClient *> interfaces(LanguageClientManager::clients());
|
||||
QVector<BaseClient *> toShutdown;
|
||||
QList<BaseSettings *> toStart = m_settings;
|
||||
// check currently registered interfaces
|
||||
for (auto interface : interfaces) {
|
||||
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;
|
||||
QList<StdIOSettings *> restarts = Utils::filtered(m_settings, &StdIOSettings::needsRestart);
|
||||
for (auto setting : restarts + m_model.removed()) {
|
||||
if (auto client = setting->m_client) {
|
||||
if (client->reachable())
|
||||
client->shutdown();
|
||||
else
|
||||
LanguageClientManager::deleteClient(client);
|
||||
}
|
||||
}
|
||||
for (auto interface : toShutdown) {
|
||||
if (interface->reachable())
|
||||
interface->shutdown();
|
||||
else
|
||||
LanguageClientManager::deleteClient(interface);
|
||||
}
|
||||
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()
|
||||
{
|
||||
m_model.reset(m_settings);
|
||||
}
|
||||
|
||||
LanguageClientSettingsModel::~LanguageClientSettingsModel()
|
||||
@@ -276,7 +271,7 @@ QVariant LanguageClientSettingsModel::data(const QModelIndex &index, int role) c
|
||||
{
|
||||
if (!index.isValid())
|
||||
return QVariant();
|
||||
BaseSettings *setting = m_settings[index.row()];
|
||||
StdIOSettings *setting = m_settings[index.row()];
|
||||
QTC_ASSERT(setting, return false);
|
||||
if (role == Qt::DisplayRole || role == Qt::EditRole) {
|
||||
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);
|
||||
beginRemoveRows(parent, row, end);
|
||||
for (auto i = end; i >= row; --i)
|
||||
delete m_settings.takeAt(i);
|
||||
m_removed << m_settings.takeAt(i);
|
||||
endRemoveRows();
|
||||
return true;
|
||||
}
|
||||
@@ -324,7 +319,7 @@ bool LanguageClientSettingsModel::insertRows(int row, int count, const QModelInd
|
||||
return false;
|
||||
beginInsertRows(parent, row, row + count - 1);
|
||||
for (int i = 0; i < count; ++i)
|
||||
m_settings.insert(row + i, new BaseSettings());
|
||||
m_settings.insert(row + i, new StdIOSettings());
|
||||
endInsertRows();
|
||||
return true;
|
||||
}
|
||||
@@ -333,23 +328,31 @@ bool LanguageClientSettingsModel::setData(const QModelIndex &index, const QVaria
|
||||
{
|
||||
if (!index.isValid())
|
||||
return false;
|
||||
BaseSettings *setting = m_settings[index.row()];
|
||||
StdIOSettings *setting = m_settings[index.row()];
|
||||
QTC_ASSERT(setting, return false);
|
||||
if (role == Qt::DisplayRole || role == Qt::EditRole) {
|
||||
const QString strVal(value.toString());
|
||||
QString *settingsValue = nullptr;
|
||||
switch (index.column()) {
|
||||
case DisplayNameColumn: setting->m_name = value.toString(); break;
|
||||
case MimeTypeColumn: setting->m_mimeType = value.toString(); break;
|
||||
case ExecutableColumn: setting->m_executable = value.toString(); break;
|
||||
case ArgumentsColumn: setting->m_arguments = value.toString(); break;
|
||||
default:
|
||||
return false;
|
||||
case DisplayNameColumn: settingsValue = &setting->m_name; break;
|
||||
case MimeTypeColumn: settingsValue = &setting->m_mimeType; break;
|
||||
case ExecutableColumn: settingsValue = &setting->m_executable; break;
|
||||
case ArgumentsColumn: settingsValue = &setting->m_arguments; break;
|
||||
}
|
||||
if (settingsValue) {
|
||||
if (strVal != *settingsValue) {
|
||||
*settingsValue = value.toString();
|
||||
emit dataChanged(index, index, { Qt::EditRole, Qt::DisplayRole });
|
||||
}
|
||||
return true;
|
||||
}
|
||||
emit dataChanged(index, index, { Qt::EditRole, Qt::DisplayRole });
|
||||
return true;
|
||||
}
|
||||
|
||||
if (role == Qt::CheckStateRole && index.column() == EnabledColumn) {
|
||||
setting->m_enabled = value.toBool();
|
||||
emit dataChanged(index, index, { Qt::CheckStateRole });
|
||||
if (setting->m_enabled != value.toBool()) {
|
||||
setting->m_enabled = !setting->m_enabled;
|
||||
emit dataChanged(index, index, { Qt::CheckStateRole });
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -363,28 +366,31 @@ Qt::ItemFlags LanguageClientSettingsModel::flags(const QModelIndex &index) const
|
||||
return defaultFlags;
|
||||
}
|
||||
|
||||
void LanguageClientSettingsModel::reset(const QList<BaseSettings *> &settings)
|
||||
void LanguageClientSettingsModel::reset(const QList<StdIOSettings *> &settings)
|
||||
{
|
||||
beginResetModel();
|
||||
qDeleteAll(m_settings);
|
||||
m_settings = Utils::transform(settings, [](const BaseSettings *setting){
|
||||
return new BaseSettings(*setting);
|
||||
qDeleteAll(m_removed);
|
||||
m_removed.clear();
|
||||
m_settings = Utils::transform(settings, [](const StdIOSettings *other){
|
||||
return dynamic_cast<StdIOSettings *>(other->copy());
|
||||
});
|
||||
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);
|
||||
client->setName(m_name);
|
||||
if (m_mimeType != noLanguageFilter)
|
||||
client->setSupportedMimeType({m_mimeType});
|
||||
return client;
|
||||
return !m_name.isEmpty();
|
||||
}
|
||||
|
||||
BaseClient *BaseSettings::createClient() const
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QVariantMap BaseSettings::toMap() const
|
||||
@@ -393,8 +399,6 @@ QVariantMap BaseSettings::toMap() const
|
||||
map.insert(nameKey, m_name);
|
||||
map.insert(enabledKey, m_enabled);
|
||||
map.insert(mimeTypeKey, m_mimeType);
|
||||
map.insert(executableKey, m_executable);
|
||||
map.insert(argumentsKey, m_arguments);
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -403,8 +407,6 @@ void BaseSettings::fromMap(const QVariantMap &map)
|
||||
m_name = map[nameKey].toString();
|
||||
m_enabled = map[enabledKey].toBool();
|
||||
m_mimeType = map[mimeTypeKey].toString();
|
||||
m_executable = map[executableKey].toString();
|
||||
m_arguments = map[argumentsKey].toString();
|
||||
}
|
||||
|
||||
void LanguageClientSettings::init()
|
||||
@@ -413,12 +415,12 @@ void LanguageClientSettings::init()
|
||||
settingsPage.init();
|
||||
}
|
||||
|
||||
QList<BaseSettings *> LanguageClientSettings::fromSettings(QSettings *settingsIn)
|
||||
QList<StdIOSettings *> LanguageClientSettings::fromSettings(QSettings *settingsIn)
|
||||
{
|
||||
settingsIn->beginGroup(settingsGroupKey);
|
||||
auto variants = settingsIn->value(clientsKey).toList();
|
||||
auto settings = Utils::transform(variants, [](const QVariant& var){
|
||||
auto settings = new BaseSettings();
|
||||
auto settings = new StdIOSettings();
|
||||
settings->fromMap(var.toMap());
|
||||
return settings;
|
||||
});
|
||||
@@ -426,14 +428,52 @@ QList<BaseSettings *> LanguageClientSettings::fromSettings(QSettings *settingsIn
|
||||
return settings;
|
||||
}
|
||||
|
||||
void LanguageClientSettings::toSettings(QSettings *settings, const QList<BaseSettings *> &languageClientSettings)
|
||||
void LanguageClientSettings::toSettings(QSettings *settings, const QList<StdIOSettings *> &languageClientSettings)
|
||||
{
|
||||
settings->beginGroup(settingsGroupKey);
|
||||
settings->setValue(clientsKey, Utils::transform(languageClientSettings,
|
||||
[](const BaseSettings *setting){
|
||||
[](const StdIOSettings *setting){
|
||||
return QVariant(setting->toMap());
|
||||
}));
|
||||
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
|
||||
|
@@ -41,35 +41,69 @@ class BaseSettings
|
||||
{
|
||||
public:
|
||||
BaseSettings() = default;
|
||||
BaseSettings(const QString &name, bool enabled, const QString &mimeTypeName,
|
||||
const QString &executable, const QString &arguments)
|
||||
BaseSettings(const QString &name, bool enabled, const QString &mimeTypeName)
|
||||
: m_name(name)
|
||||
, m_enabled(enabled)
|
||||
, m_mimeType(mimeTypeName)
|
||||
, m_executable(executable)
|
||||
, m_arguments(arguments)
|
||||
{}
|
||||
|
||||
virtual ~BaseSettings() = default;
|
||||
|
||||
QString m_name = QString("New Language Server");
|
||||
bool m_enabled = true;
|
||||
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_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();
|
||||
|
||||
QVariantMap toMap() const;
|
||||
void fromMap(const QVariantMap &map);
|
||||
protected:
|
||||
StdIOSettings(const StdIOSettings &other) = default;
|
||||
StdIOSettings(StdIOSettings &&other) = default;
|
||||
StdIOSettings &operator=(const StdIOSettings &other) = default;
|
||||
StdIOSettings &operator=(StdIOSettings &&other) = default;
|
||||
};
|
||||
|
||||
class LanguageClientSettings
|
||||
{
|
||||
public:
|
||||
static void init();
|
||||
static QList<BaseSettings *> fromSettings(QSettings *settings);
|
||||
static void toSettings(QSettings *settings, const QList<BaseSettings *> &languageClientSettings);
|
||||
|
||||
static QList<StdIOSettings *> fromSettings(QSettings *settings);
|
||||
static void toSettings(QSettings *settings, const QList<StdIOSettings *> &languageClientSettings);
|
||||
};
|
||||
|
||||
} // namespace LanguageClient
|
||||
|
@@ -551,7 +551,7 @@ void ModelIndexer::removeDiagramReferenceFile(const QString &file,
|
||||
|
||||
const QLoggingCategory &ModelIndexer::logger()
|
||||
{
|
||||
static const QLoggingCategory category("qtc.modeleditor.modelindexer");
|
||||
static const QLoggingCategory category("qtc.modeleditor.modelindexer", QtWarningMsg);
|
||||
return category;
|
||||
}
|
||||
|
||||
|
@@ -56,7 +56,7 @@
|
||||
#include <memory>
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(gccLog, "qtc.projectexplorer.toolchain.gcc");
|
||||
Q_LOGGING_CATEGORY(gccLog, "qtc.projectexplorer.toolchain.gcc", QtWarningMsg);
|
||||
} // namespace
|
||||
|
||||
using namespace Utils;
|
||||
|
@@ -88,7 +88,7 @@ QList<BuildInfo *> ProjectImporter::import(const Utils::FileName &importPath, bo
|
||||
{
|
||||
QList<BuildInfo *> result;
|
||||
|
||||
const QLoggingCategory log("qtc.projectexplorer.import");
|
||||
const QLoggingCategory log("qtc.projectexplorer.import", QtWarningMsg);
|
||||
qCDebug(log) << "ProjectImporter::import" << importPath << silent;
|
||||
|
||||
QFileInfo fi = importPath.toFileInfo();
|
||||
|
@@ -470,7 +470,7 @@ Node *FlatModel::nodeForIndex(const QModelIndex &index) const
|
||||
|
||||
const QLoggingCategory &FlatModel::logger()
|
||||
{
|
||||
static QLoggingCategory logger("qtc.projectexplorer.flatmodel");
|
||||
static QLoggingCategory logger("qtc.projectexplorer.flatmodel", QtWarningMsg);
|
||||
return logger;
|
||||
}
|
||||
|
||||
|
@@ -66,7 +66,7 @@ using namespace Utils;
|
||||
using namespace ProjectExplorer::Internal;
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(statesLog, "qtc.projectmanager.states")
|
||||
Q_LOGGING_CATEGORY(statesLog, "qtc.projectmanager.states", QtWarningMsg)
|
||||
}
|
||||
|
||||
namespace ProjectExplorer {
|
||||
|
@@ -27,6 +27,6 @@
|
||||
|
||||
namespace QbsProjectManager {
|
||||
namespace Internal {
|
||||
Q_LOGGING_CATEGORY(qbsPmLog, "qtc.qbspm")
|
||||
Q_LOGGING_CATEGORY(qbsPmLog, "qtc.qbspm", QtWarningMsg)
|
||||
}
|
||||
}
|
||||
|
@@ -349,7 +349,7 @@ BaseQtVersion::QmakeBuildConfigs MakeFileParse::effectiveBuildConfig(BaseQtVersi
|
||||
|
||||
const QLoggingCategory &MakeFileParse::logging()
|
||||
{
|
||||
static const QLoggingCategory category("qtc.qmakeprojectmanager.import");
|
||||
static const QLoggingCategory category("qtc.qmakeprojectmanager.import", QtWarningMsg);
|
||||
return category;
|
||||
}
|
||||
|
||||
|
@@ -96,7 +96,7 @@ private:
|
||||
|
||||
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); }
|
||||
|
||||
|
@@ -38,7 +38,7 @@
|
||||
#include <QTimer>
|
||||
#include <QWidget>
|
||||
|
||||
static Q_LOGGING_CATEGORY(dragToolInfo, "qtc.qmldesigner.formeditor");
|
||||
static Q_LOGGING_CATEGORY(dragToolInfo, "qtc.qmldesigner.formeditor", QtWarningMsg);
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
|
@@ -42,7 +42,7 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
static Q_LOGGING_CATEGORY(moveManipulatorInfo, "qtc.qmldesigner.formeditor");
|
||||
static Q_LOGGING_CATEGORY(moveManipulatorInfo, "qtc.qmldesigner.formeditor", QtWarningMsg);
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
|
@@ -42,7 +42,7 @@
|
||||
#include <QPen>
|
||||
#include <qdebug.h>
|
||||
|
||||
static Q_LOGGING_CATEGORY(itemlibraryPopulate, "qtc.itemlibrary.populate")
|
||||
static Q_LOGGING_CATEGORY(itemlibraryPopulate, "qtc.itemlibrary.populate", QtWarningMsg)
|
||||
|
||||
static bool inline registerItemLibrarySortedModel() {
|
||||
qmlRegisterType<QmlDesigner::ItemLibrarySectionModel>();
|
||||
|
@@ -49,7 +49,7 @@
|
||||
|
||||
#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();
|
||||
|
||||
|
@@ -34,7 +34,7 @@
|
||||
#include <typeinfo>
|
||||
|
||||
|
||||
static Q_LOGGING_CATEGORY(qmlRewriter, "qtc.rewriter.qmlrewriter")
|
||||
static Q_LOGGING_CATEGORY(qmlRewriter, "qtc.rewriter.qmlrewriter", QtWarningMsg)
|
||||
|
||||
using namespace QmlDesigner::Internal;
|
||||
|
||||
|
@@ -85,7 +85,7 @@
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
static Q_LOGGING_CATEGORY(instanceViewBenchmark, "qtc.nodeinstances.init")
|
||||
static Q_LOGGING_CATEGORY(instanceViewBenchmark, "qtc.nodeinstances.init", QtWarningMsg)
|
||||
|
||||
void NodeInstanceServerProxy::showCannotConnectToPuppetWarningAndSwitchToEditMode()
|
||||
{
|
||||
|
@@ -65,8 +65,8 @@
|
||||
#include <QThread>
|
||||
#include <QSettings>
|
||||
|
||||
static Q_LOGGING_CATEGORY(puppetStart, "qtc.puppet.start")
|
||||
static Q_LOGGING_CATEGORY(puppetBuild, "qtc.puppet.build")
|
||||
static Q_LOGGING_CATEGORY(puppetStart, "qtc.puppet.start", QtWarningMsg)
|
||||
static Q_LOGGING_CATEGORY(puppetBuild, "qtc.puppet.build", QtWarningMsg)
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
|
@@ -64,7 +64,7 @@
|
||||
using namespace LanguageUtils;
|
||||
using namespace QmlJS;
|
||||
|
||||
static Q_LOGGING_CATEGORY(rewriterBenchmark, "qtc.rewriter.load")
|
||||
static Q_LOGGING_CATEGORY(rewriterBenchmark, "qtc.rewriter.load", QtWarningMsg)
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -52,7 +52,7 @@
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
static Q_LOGGING_CATEGORY(viewBenchmark, "qtc.viewmanager.attach")
|
||||
static Q_LOGGING_CATEGORY(viewBenchmark, "qtc.viewmanager.attach", QtWarningMsg)
|
||||
|
||||
class ViewManagerData
|
||||
{
|
||||
|
@@ -54,7 +54,7 @@
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
Q_LOGGING_CATEGORY(documentManagerLog, "qtc.qtquickdesigner.documentmanager")
|
||||
Q_LOGGING_CATEGORY(documentManagerLog, "qtc.qtquickdesigner.documentmanager", QtWarningMsg)
|
||||
|
||||
static inline QmlDesigner::DesignDocument* designDocument()
|
||||
{
|
||||
|
@@ -70,7 +70,7 @@
|
||||
#include <QScreen>
|
||||
#include <QWindow>
|
||||
|
||||
Q_LOGGING_CATEGORY(qmldesignerLog, "qtc.qmldesigner")
|
||||
Q_LOGGING_CATEGORY(qmldesignerLog, "qtc.qmldesigner", QtWarningMsg)
|
||||
|
||||
using namespace QmlDesigner::Internal;
|
||||
|
||||
|
@@ -38,7 +38,7 @@ using namespace ProjectExplorer;
|
||||
|
||||
namespace QtSupport {
|
||||
|
||||
static QLoggingCategory log("qtc.qscxmlcgenerator");
|
||||
static QLoggingCategory log("qtc.qscxmlcgenerator", QtWarningMsg);
|
||||
static const char TaskCategory[] = "Task.Category.ExtraCompiler.QScxmlc";
|
||||
|
||||
QScxmlcGenerator::QScxmlcGenerator(const Project *project,
|
||||
|
@@ -43,6 +43,7 @@
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QLoggingCategory>
|
||||
#include <QSharedData>
|
||||
#include <QScopedPointer>
|
||||
#include <QSharedPointer>
|
||||
@@ -57,7 +58,11 @@ using namespace Core;
|
||||
using namespace Utils;
|
||||
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
|
||||
@@ -322,6 +327,7 @@ void StateListener::slotStateChanged()
|
||||
if (!vc)
|
||||
state.clearPatchFile(); // Need a repository to patch
|
||||
|
||||
qCDebug(stateLog).noquote() << "VC:" << (vc ? vc->displayName() : QString("None")) << state;
|
||||
EditorManager::updateWindowTitles();
|
||||
emit stateChanged(state, vc);
|
||||
}
|
||||
@@ -570,11 +576,10 @@ void VcsBasePlugin::extensionsInitialized()
|
||||
|
||||
void VcsBasePlugin::slotSubmitEditorAboutToClose(VcsBaseSubmitEditor *submitEditor, bool *result)
|
||||
{
|
||||
if (debug)
|
||||
qDebug() << this << "plugin's submit editor"
|
||||
<< d->m_submitEditor << (d->m_submitEditor ? d->m_submitEditor->document()->id().name() : "")
|
||||
<< "closing submit editor" << submitEditor
|
||||
<< (submitEditor ? submitEditor->document()->id().name() : "");
|
||||
qCDebug(baseLog) << this << "plugin's submit editor" << d->m_submitEditor
|
||||
<< (d->m_submitEditor ? d->m_submitEditor->document()->id().name() : QByteArray())
|
||||
<< "closing submit editor" << submitEditor
|
||||
<< (submitEditor ? submitEditor->document()->id().name() : QByteArray());
|
||||
if (submitEditor == d->m_submitEditor)
|
||||
*result = submitEditorAboutToClose();
|
||||
}
|
||||
@@ -613,8 +618,7 @@ const VcsBasePluginState &VcsBasePlugin::currentState() const
|
||||
|
||||
bool VcsBasePlugin::enableMenuAction(ActionState as, QAction *menuAction) const
|
||||
{
|
||||
if (debug)
|
||||
qDebug() << "enableMenuAction" << menuAction->text() << as;
|
||||
qCDebug(baseLog) << "enableMenuAction" << menuAction->text() << as;
|
||||
switch (as) {
|
||||
case NoVcsEnabled: {
|
||||
const bool supportsCreation = d->supportsRepositoryCreation();
|
||||
@@ -727,8 +731,7 @@ bool VcsBasePlugin::raiseSubmitEditor() const
|
||||
QString VcsBasePlugin::findRepositoryForDirectory(const QString &dirS,
|
||||
const QString &checkFile)
|
||||
{
|
||||
if (debugRepositorySearch)
|
||||
qDebug() << ">VcsBasePlugin::findRepositoryForDirectory" << dirS << checkFile;
|
||||
qCDebug(findRepoLog) << ">" << dirS << checkFile;
|
||||
QTC_ASSERT(!dirS.isEmpty() && !checkFile.isEmpty(), return QString());
|
||||
|
||||
const QString root = QDir::rootPath();
|
||||
@@ -741,13 +744,11 @@ QString VcsBasePlugin::findRepositoryForDirectory(const QString &dirS,
|
||||
break;
|
||||
|
||||
if (QFileInfo(directory, checkFile).isFile()) {
|
||||
if (debugRepositorySearch)
|
||||
qDebug() << "<VcsBasePlugin::findRepositoryForDirectory> " << absDirPath;
|
||||
qCDebug(findRepoLog) << "<" << absDirPath;
|
||||
return absDirPath;
|
||||
}
|
||||
} while (!directory.isRoot() && directory.cdUp());
|
||||
if (debugRepositorySearch)
|
||||
qDebug() << "<VcsBasePlugin::findRepositoryForDirectory bailing out at " << directory.absolutePath();
|
||||
qCDebug(findRepoLog) << "< bailing out at" << directory.absolutePath();
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
@@ -69,8 +69,6 @@ int main(int argc, char *argv[])
|
||||
#ifdef Q_OS_WIN
|
||||
qInstallMessageHandler(messageOutput);
|
||||
#endif
|
||||
QLoggingCategory::setFilterRules(QStringLiteral("qtc.*.debug=false"));
|
||||
|
||||
QCoreApplication::setOrganizationName(QStringLiteral("QtProject"));
|
||||
QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org"));
|
||||
QCoreApplication::setApplicationName(QStringLiteral("ClangBackend"));
|
||||
|
@@ -44,7 +44,7 @@
|
||||
#include <QDebug>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
Q_LOGGING_CATEGORY(serverLog, "qtc.clangbackend.server");
|
||||
Q_LOGGING_CATEGORY(serverLog, "qtc.clangbackend.server", QtWarningMsg);
|
||||
|
||||
static bool useSupportiveTranslationUnit()
|
||||
{
|
||||
|
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "clangiasyncjob.h"
|
||||
|
||||
Q_LOGGING_CATEGORY(jobsLog, "qtc.clangbackend.jobs");
|
||||
Q_LOGGING_CATEGORY(jobsLog, "qtc.clangbackend.jobs", QtWarningMsg);
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
|
@@ -35,7 +35,7 @@
|
||||
#include <QLoggingCategory>
|
||||
#include <QUuid>
|
||||
|
||||
Q_LOGGING_CATEGORY(tuLog, "qtc.clangbackend.translationunits");
|
||||
Q_LOGGING_CATEGORY(tuLog, "qtc.clangbackend.translationunits", QtWarningMsg);
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <QLoggingCategory>
|
||||
|
||||
static Q_LOGGING_CATEGORY(verboseLibLog, "qtc.clangbackend.verboselib");
|
||||
static Q_LOGGING_CATEGORY(verboseLibLog, "qtc.clangbackend.verboselib", QtWarningMsg);
|
||||
|
||||
static bool isVerboseModeEnabled()
|
||||
{
|
||||
|
@@ -184,8 +184,6 @@ struct Data // because we have a cycle dependency
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
try {
|
||||
//QLoggingCategory::setFilterRules(QStringLiteral("*.debug=false"));
|
||||
|
||||
QCoreApplication::setOrganizationName(QStringLiteral("QtProject"));
|
||||
QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org"));
|
||||
QCoreApplication::setApplicationName(QStringLiteral("ClangPchManagerBackend"));
|
||||
|
@@ -100,8 +100,6 @@ struct Data // because we have a cycle dependency
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
try {
|
||||
//QLoggingCategory::setFilterRules(QStringLiteral("*.debug=false"));
|
||||
|
||||
QCoreApplication::setOrganizationName(QStringLiteral("QtProject"));
|
||||
QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org"));
|
||||
QCoreApplication::setApplicationName(QStringLiteral("ClangRefactoringBackend"));
|
||||
|
@@ -76,7 +76,6 @@ static QString pluginFolder(const QLatin1String &folder)
|
||||
|
||||
void tst_PluginManager::init()
|
||||
{
|
||||
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
|
||||
m_pm = new PluginManager;
|
||||
m_pm->setPluginIID(QLatin1String("plugin"));
|
||||
m_objectAdded = new QSignalSpy(m_pm, SIGNAL(objectAdded(QObject*)));
|
||||
|
@@ -90,7 +90,6 @@ private:
|
||||
|
||||
void tst_PluginSpec::init()
|
||||
{
|
||||
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
|
||||
QVERIFY(QDir::setCurrent(QLatin1String(PLUGINSPEC_DIR)));
|
||||
}
|
||||
|
||||
|
@@ -112,7 +112,6 @@ private:
|
||||
|
||||
void tst_Dependencies::initTestCase()
|
||||
{
|
||||
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
|
||||
m_path = QLatin1Literal(TESTSRCDIR "/samples");
|
||||
|
||||
m_basePaths.append(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath));
|
||||
|
@@ -100,7 +100,6 @@ QString resourcePath()
|
||||
|
||||
void tst_ImportCheck::initTestCase()
|
||||
{
|
||||
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
|
||||
if (!ModelManagerInterface::instance())
|
||||
new ModelManagerInterface;
|
||||
|
||||
|
@@ -681,7 +681,7 @@ void extremeFunction3(int parameter1,
|
||||
// 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)
|
||||
|
||||
|
@@ -45,8 +45,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
QCoreApplication application(argc, argv);
|
||||
|
||||
QLoggingCategory::setFilterRules(QStringLiteral("*.info=false\n*.debug=false\n*.warning=true"));
|
||||
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
#ifdef WITH_BENCHMARKS
|
||||
benchmark::Initialize(&argc, argv);
|
||||
|
Reference in New Issue
Block a user