forked from qt-creator/qt-creator
Id: Add QByteArray constructor
Distinguish from const char * one. QString ctor is yet to be removed Change-Id: I2da231036c6417353b0566d39666d918ad141c6d Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
f31da9ac55
commit
7c4e2b6c60
@@ -42,8 +42,8 @@ IAnalyzerTool::IAnalyzerTool(QObject *parent)
|
|||||||
Id IAnalyzerTool::defaultMenuGroup(StartMode mode)
|
Id IAnalyzerTool::defaultMenuGroup(StartMode mode)
|
||||||
{
|
{
|
||||||
if (mode == StartRemote)
|
if (mode == StartRemote)
|
||||||
return Constants::G_ANALYZER_REMOTE_TOOLS;
|
return Id(Constants::G_ANALYZER_REMOTE_TOOLS);
|
||||||
return Constants::G_ANALYZER_TOOLS;
|
return Id(Constants::G_ANALYZER_TOOLS);
|
||||||
}
|
}
|
||||||
|
|
||||||
Id IAnalyzerTool::defaultActionId(const IAnalyzerTool *tool, StartMode mode)
|
Id IAnalyzerTool::defaultActionId(const IAnalyzerTool *tool, StartMode mode)
|
||||||
@@ -51,11 +51,11 @@ Id IAnalyzerTool::defaultActionId(const IAnalyzerTool *tool, StartMode mode)
|
|||||||
Id id = tool->id();
|
Id id = tool->id();
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case StartLocal:
|
case StartLocal:
|
||||||
return Id(QByteArray("Analyzer." + id.name() + ".Local").data());
|
return Id(QByteArray("Analyzer." + id.name() + ".Local"));
|
||||||
case StartRemote:
|
case StartRemote:
|
||||||
return Id(QByteArray("Analyzer." + id.name() + ".Remote").data());
|
return Id(QByteArray("Analyzer." + id.name() + ".Remote"));
|
||||||
case StartQml:
|
case StartQml:
|
||||||
return Id(QByteArray("Analyzer." + id.name() + ".Qml").data());
|
return Id(QByteArray("Analyzer." + id.name() + ".Qml"));
|
||||||
}
|
}
|
||||||
return Id();
|
return Id();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ QString BazaarControl::displayName() const
|
|||||||
|
|
||||||
Core::Id BazaarControl::id() const
|
Core::Id BazaarControl::id() const
|
||||||
{
|
{
|
||||||
return VcsBase::Constants::VCS_ID_BAZAAR;
|
return Core::Id(VcsBase::Constants::VCS_ID_BAZAAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BazaarControl::managesDirectory(const QString &directory, QString *topLevel) const
|
bool BazaarControl::managesDirectory(const QString &directory, QString *topLevel) const
|
||||||
|
|||||||
@@ -373,7 +373,7 @@ public:
|
|||||||
return m_file->open(errorString, fileName);
|
return m_file->open(errorString, fileName);
|
||||||
}
|
}
|
||||||
Core::IDocument *document() { return m_file; }
|
Core::IDocument *document() { return m_file; }
|
||||||
Core::Id id() const { return Core::Constants::K_DEFAULT_BINARY_EDITOR_ID; }
|
Core::Id id() const { return Core::Id(Core::Constants::K_DEFAULT_BINARY_EDITOR_ID); }
|
||||||
QString displayName() const { return m_displayName; }
|
QString displayName() const { return m_displayName; }
|
||||||
void setDisplayName(const QString &title) { m_displayName = title; emit changed(); }
|
void setDisplayName(const QString &title) { m_displayName = title; emit changed(); }
|
||||||
|
|
||||||
@@ -417,7 +417,7 @@ BinEditorFactory::BinEditorFactory(BinEditorPlugin *owner) :
|
|||||||
|
|
||||||
Core::Id BinEditorFactory::id() const
|
Core::Id BinEditorFactory::id() const
|
||||||
{
|
{
|
||||||
return Core::Constants::K_DEFAULT_BINARY_EDITOR_ID;
|
return Core::Id(Core::Constants::K_DEFAULT_BINARY_EDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString BinEditorFactory::displayName() const
|
QString BinEditorFactory::displayName() const
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ QString ClearCaseControl::displayName() const
|
|||||||
|
|
||||||
Core::Id ClearCaseControl::id() const
|
Core::Id ClearCaseControl::id() const
|
||||||
{
|
{
|
||||||
return ClearCase::Constants::VCS_ID_CLEARCASE;
|
return Core::Id(ClearCase::Constants::VCS_ID_CLEARCASE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ClearCaseControl::isConfigured() const
|
bool ClearCaseControl::isConfigured() const
|
||||||
|
|||||||
@@ -1261,7 +1261,7 @@ Core::IEditor *ClearCasePlugin::showOutputInEditor(const QString& title, const Q
|
|||||||
{
|
{
|
||||||
const VcsBase::VcsBaseEditorParameters *params = findType(editorType);
|
const VcsBase::VcsBaseEditorParameters *params = findType(editorType);
|
||||||
QTC_ASSERT(params, return 0);
|
QTC_ASSERT(params, return 0);
|
||||||
const Core::Id id = params->id;
|
const Core::Id id = Core::Id(QByteArray(params->id));
|
||||||
if (ClearCase::Constants::debug)
|
if (ClearCase::Constants::debug)
|
||||||
qDebug() << "ClearCasePlugin::showOutputInEditor" << title << id.name()
|
qDebug() << "ClearCasePlugin::showOutputInEditor" << title << id.name()
|
||||||
<< "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
<< "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ Core::IEditor *CMakeEditor::duplicate(QWidget *parent)
|
|||||||
|
|
||||||
Core::Id CMakeEditor::id() const
|
Core::Id CMakeEditor::id() const
|
||||||
{
|
{
|
||||||
return CMakeProjectManager::Constants::CMAKE_EDITOR_ID;
|
return Core::Id(CMakeProjectManager::Constants::CMAKE_EDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeEditor::markAsChanged()
|
void CMakeEditor::markAsChanged()
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ CMakeEditorFactory::CMakeEditorFactory(CMakeManager *manager)
|
|||||||
|
|
||||||
Core::Id CMakeEditorFactory::id() const
|
Core::Id CMakeEditorFactory::id() const
|
||||||
{
|
{
|
||||||
return CMakeProjectManager::Constants::CMAKE_EDITOR_ID;
|
return Core::Id(CMakeProjectManager::Constants::CMAKE_EDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CMakeEditorFactory::displayName() const
|
QString CMakeEditorFactory::displayName() const
|
||||||
|
|||||||
@@ -565,5 +565,5 @@ QString CMakeRunConfigurationFactory::buildTargetFromId(Core::Id id)
|
|||||||
Core::Id CMakeRunConfigurationFactory::idFromBuildTarget(const QString &target)
|
Core::Id CMakeRunConfigurationFactory::idFromBuildTarget(const QString &target)
|
||||||
{
|
{
|
||||||
QString id = QString::fromLatin1(CMAKE_RC_PREFIX) + target;
|
QString id = QString::fromLatin1(CMAKE_RC_PREFIX) + target;
|
||||||
return Core::Id(id.toUtf8().constData());
|
return Core::Id(id.toUtf8());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class CORE_EXPORT Feature : public Id
|
|||||||
{
|
{
|
||||||
friend class FeatureSet;
|
friend class FeatureSet;
|
||||||
public:
|
public:
|
||||||
Feature(const char *name) : Id(name) {}
|
Feature(const char *name) : Id(QByteArray(name)) {}
|
||||||
explicit Feature(const QString &name) : Id(name) {}
|
explicit Feature(const QString &name) : Id(name) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -42,12 +42,12 @@ Context::Context(const char *id, int offset)
|
|||||||
|
|
||||||
void Context::add(const char *id)
|
void Context::add(const char *id)
|
||||||
{
|
{
|
||||||
d.append(Id(id).uniqueIdentifier());
|
d.append(Id(QByteArray(id)).uniqueIdentifier());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Context::contains(const char *id) const
|
bool Context::contains(const char *id) const
|
||||||
{
|
{
|
||||||
return d.contains(Id(id).uniqueIdentifier());
|
return d.contains(Id(QByteArray(id)).uniqueIdentifier());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|||||||
@@ -52,13 +52,13 @@ namespace Core {
|
|||||||
class StringHolder
|
class StringHolder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit StringHolder(const char *s)
|
StringHolder(const char *s, int length)
|
||||||
: str(s)
|
: n(length), str(s)
|
||||||
{
|
{
|
||||||
n = strlen(s);
|
if (!n)
|
||||||
int m = n;
|
length = n = strlen(s);
|
||||||
h = 0;
|
h = 0;
|
||||||
while (m--) {
|
while (length--) {
|
||||||
h = (h << 4) + *s++;
|
h = (h << 4) + *s++;
|
||||||
h ^= (h & 0xf0000000) >> 23;
|
h ^= (h & 0xf0000000) >> 23;
|
||||||
h &= 0x0fffffff;
|
h &= 0x0fffffff;
|
||||||
@@ -97,10 +97,10 @@ static int lastUid = 0;
|
|||||||
static QVector<QByteArray> stringFromId;
|
static QVector<QByteArray> stringFromId;
|
||||||
static IdCache idFromString;
|
static IdCache idFromString;
|
||||||
|
|
||||||
static int theId(const char *str)
|
static int theId(const char *str, int n = 0)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(str && *str, return 0);
|
QTC_ASSERT(str && *str, return 0);
|
||||||
StringHolder sh(str);
|
StringHolder sh(str, n);
|
||||||
int res = idFromString.value(sh, 0);
|
int res = idFromString.value(sh, 0);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
if (lastUid == 0)
|
if (lastUid == 0)
|
||||||
@@ -113,8 +113,17 @@ static int theId(const char *str)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int theId(const QByteArray &ba)
|
||||||
|
{
|
||||||
|
return theId(ba.constData(), ba.size());
|
||||||
|
}
|
||||||
|
|
||||||
Id::Id(const char *name)
|
Id::Id(const char *name)
|
||||||
: m_id(theId(name))
|
: m_id(theId(name, 0))
|
||||||
|
{}
|
||||||
|
|
||||||
|
Id::Id(const QByteArray &name)
|
||||||
|
: m_id(theId(name))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Id::Id(const QString &name)
|
Id::Id(const QString &name)
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ class CORE_EXPORT Id
|
|||||||
public:
|
public:
|
||||||
Id() : m_id(0) {}
|
Id() : m_id(0) {}
|
||||||
Id(const char *name);
|
Id(const char *name);
|
||||||
// FIXME: Replace with QByteArray
|
explicit Id(const QByteArray &name);
|
||||||
|
// FIXME: Remove
|
||||||
explicit Id(const QString &name);
|
explicit Id(const QString &name);
|
||||||
QByteArray name() const;
|
QByteArray name() const;
|
||||||
QString toString() const;
|
QString toString() const;
|
||||||
|
|||||||
@@ -1743,7 +1743,7 @@ Core::IEditor *CPPEditor::duplicate(QWidget *parent)
|
|||||||
|
|
||||||
Core::Id CPPEditor::id() const
|
Core::Id CPPEditor::id() const
|
||||||
{
|
{
|
||||||
return CppEditor::Constants::CPPEDITOR_ID;
|
return Core::Id(CppEditor::Constants::CPPEDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPPEditor::open(QString *errorString, const QString &fileName, const QString &realFileName)
|
bool CPPEditor::open(QString *errorString, const QString &fileName, const QString &realFileName)
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ CppEditorFactory::CppEditorFactory(CppPlugin *owner) :
|
|||||||
|
|
||||||
Core::Id CppEditorFactory::id() const
|
Core::Id CppEditorFactory::id() const
|
||||||
{
|
{
|
||||||
return CppEditor::Constants::CPPEDITOR_ID;
|
return Core::Id(CppEditor::Constants::CPPEDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CppEditorFactory::displayName() const
|
QString CppEditorFactory::displayName() const
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ QString CvsControl::displayName() const
|
|||||||
|
|
||||||
Core::Id CvsControl::id() const
|
Core::Id CvsControl::id() const
|
||||||
{
|
{
|
||||||
return VcsBase::Constants::VCS_ID_CVS;
|
return Core::Id(VcsBase::Constants::VCS_ID_CVS);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CvsControl::isConfigured() const
|
bool CvsControl::isConfigured() const
|
||||||
|
|||||||
@@ -1269,7 +1269,7 @@ IEditor *CvsPlugin::showOutputInEditor(const QString& title, const QString &outp
|
|||||||
{
|
{
|
||||||
const VcsBaseEditorParameters *params = findType(editorType);
|
const VcsBaseEditorParameters *params = findType(editorType);
|
||||||
QTC_ASSERT(params, return 0);
|
QTC_ASSERT(params, return 0);
|
||||||
const Id id = params->id;
|
const Id id = Core::Id(QByteArray(params->id));
|
||||||
if (Cvs::Constants::debug)
|
if (Cvs::Constants::debug)
|
||||||
qDebug() << "CVSPlugin::showOutputInEditor" << title << id.name()
|
qDebug() << "CVSPlugin::showOutputInEditor" << title << id.name()
|
||||||
<< "source=" << source << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
<< "source=" << source << "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
||||||
|
|||||||
@@ -463,12 +463,12 @@ static QToolButton *toolButton(QAction *action)
|
|||||||
return button;
|
return button;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setProxyAction(ProxyAction *proxy, const char *id)
|
static void setProxyAction(ProxyAction *proxy, Core::Id id)
|
||||||
{
|
{
|
||||||
proxy->setAction(ActionManager::command(id)->action());
|
proxy->setAction(ActionManager::command(id)->action());
|
||||||
}
|
}
|
||||||
|
|
||||||
static QToolButton *toolButton(const char *id)
|
static QToolButton *toolButton(Core::Id id)
|
||||||
{
|
{
|
||||||
return toolButton(ActionManager::command(id)->action());
|
return toolButton(ActionManager::command(id)->action());
|
||||||
}
|
}
|
||||||
@@ -1562,7 +1562,7 @@ void DebuggerPluginPrivate::onCurrentProjectChanged(Project *project)
|
|||||||
m_exitAction->setEnabled(false);
|
m_exitAction->setEnabled(false);
|
||||||
m_startAction->setEnabled(true);
|
m_startAction->setEnabled(true);
|
||||||
m_debugWithoutDeployAction->setEnabled(true);
|
m_debugWithoutDeployAction->setEnabled(true);
|
||||||
setProxyAction(m_visibleStartAction, Constants::DEBUG);
|
setProxyAction(m_visibleStartAction, Core::Id(Constants::DEBUG));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerPluginPrivate::languagesChanged()
|
void DebuggerPluginPrivate::languagesChanged()
|
||||||
@@ -2233,7 +2233,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
|
|||||||
m_exitAction->setEnabled(false);
|
m_exitAction->setEnabled(false);
|
||||||
m_startAction->setEnabled(true);
|
m_startAction->setEnabled(true);
|
||||||
m_debugWithoutDeployAction->setEnabled(true);
|
m_debugWithoutDeployAction->setEnabled(true);
|
||||||
setProxyAction(m_visibleStartAction, Constants::DEBUG);
|
setProxyAction(m_visibleStartAction, Core::Id(Constants::DEBUG));
|
||||||
m_hiddenStopAction->setAction(m_undisturbableAction);
|
m_hiddenStopAction->setAction(m_undisturbableAction);
|
||||||
} else if (state == InferiorStopOk) {
|
} else if (state == InferiorStopOk) {
|
||||||
// F5 continues, Shift-F5 kills. It is "continuable".
|
// F5 continues, Shift-F5 kills. It is "continuable".
|
||||||
@@ -2242,7 +2242,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
|
|||||||
m_exitAction->setEnabled(true);
|
m_exitAction->setEnabled(true);
|
||||||
m_startAction->setEnabled(false);
|
m_startAction->setEnabled(false);
|
||||||
m_debugWithoutDeployAction->setEnabled(false);
|
m_debugWithoutDeployAction->setEnabled(false);
|
||||||
setProxyAction(m_visibleStartAction, Constants::CONTINUE);
|
setProxyAction(m_visibleStartAction, Core::Id(Constants::CONTINUE));
|
||||||
m_hiddenStopAction->setAction(m_exitAction);
|
m_hiddenStopAction->setAction(m_exitAction);
|
||||||
m_localsAndExpressionsWindow->setShowLocals(true);
|
m_localsAndExpressionsWindow->setShowLocals(true);
|
||||||
} else if (state == InferiorRunOk) {
|
} else if (state == InferiorRunOk) {
|
||||||
@@ -2252,7 +2252,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
|
|||||||
m_exitAction->setEnabled(true);
|
m_exitAction->setEnabled(true);
|
||||||
m_startAction->setEnabled(false);
|
m_startAction->setEnabled(false);
|
||||||
m_debugWithoutDeployAction->setEnabled(false);
|
m_debugWithoutDeployAction->setEnabled(false);
|
||||||
setProxyAction(m_visibleStartAction, Constants::INTERRUPT);
|
setProxyAction(m_visibleStartAction, Core::Id(Constants::INTERRUPT));
|
||||||
m_hiddenStopAction->setAction(m_interruptAction);
|
m_hiddenStopAction->setAction(m_interruptAction);
|
||||||
m_localsAndExpressionsWindow->setShowLocals(false);
|
m_localsAndExpressionsWindow->setShowLocals(false);
|
||||||
} else if (state == DebuggerFinished) {
|
} else if (state == DebuggerFinished) {
|
||||||
@@ -2262,7 +2262,7 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
|
|||||||
m_exitAction->setEnabled(false);
|
m_exitAction->setEnabled(false);
|
||||||
m_startAction->setEnabled(true);
|
m_startAction->setEnabled(true);
|
||||||
m_debugWithoutDeployAction->setEnabled(true);
|
m_debugWithoutDeployAction->setEnabled(true);
|
||||||
setProxyAction(m_visibleStartAction, Constants::DEBUG);
|
setProxyAction(m_visibleStartAction, Core::Id(Constants::DEBUG));
|
||||||
m_hiddenStopAction->setAction(m_undisturbableAction);
|
m_hiddenStopAction->setAction(m_undisturbableAction);
|
||||||
m_codeModelSnapshot = CPlusPlus::Snapshot();
|
m_codeModelSnapshot = CPlusPlus::Snapshot();
|
||||||
setBusyCursor(false);
|
setBusyCursor(false);
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ FormEditorFactory::FormEditorFactory()
|
|||||||
|
|
||||||
Core::Id FormEditorFactory::id() const
|
Core::Id FormEditorFactory::id() const
|
||||||
{
|
{
|
||||||
return K_DESIGNER_XML_EDITOR_ID;
|
return Core::Id(K_DESIGNER_XML_EDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString FormEditorFactory::displayName() const
|
QString FormEditorFactory::displayName() const
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ Core::IDocument *FormWindowEditor::document()
|
|||||||
|
|
||||||
Core::Id FormWindowEditor::id() const
|
Core::Id FormWindowEditor::id() const
|
||||||
{
|
{
|
||||||
return Designer::Constants::K_DESIGNER_XML_EDITOR_ID;
|
return Core::Id(Designer::Constants::K_DESIGNER_XML_EDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString FormWindowEditor::displayName() const
|
QString FormWindowEditor::displayName() const
|
||||||
@@ -278,7 +278,7 @@ TextEditor::PlainTextEditor *FormWindowEditor::textEditor()
|
|||||||
|
|
||||||
Core::Id FormWindowEditor::preferredModeType() const
|
Core::Id FormWindowEditor::preferredModeType() const
|
||||||
{
|
{
|
||||||
return Core::Constants::MODE_DESIGN_TYPE;
|
return Core::Id(Core::Constants::MODE_DESIGN_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Designer
|
} // namespace Designer
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ QStringList ProjectFilesFactory::mimeTypes() const
|
|||||||
|
|
||||||
Core::Id ProjectFilesFactory::id() const
|
Core::Id ProjectFilesFactory::id() const
|
||||||
{
|
{
|
||||||
return Constants::FILES_EDITOR_ID;
|
return Core::Id(Constants::FILES_EDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ProjectFilesFactory::displayName() const
|
QString ProjectFilesFactory::displayName() const
|
||||||
@@ -94,7 +94,7 @@ ProjectFilesEditor::ProjectFilesEditor(ProjectFilesEditorWidget *editor)
|
|||||||
|
|
||||||
Core::Id ProjectFilesEditor::id() const
|
Core::Id ProjectFilesEditor::id() const
|
||||||
{
|
{
|
||||||
return Constants::FILES_EDITOR_ID;
|
return Core::Id(Constants::FILES_EDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProjectFilesEditor::duplicateSupported() const
|
bool ProjectFilesEditor::duplicateSupported() const
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ QString GitVersionControl::displayName() const
|
|||||||
|
|
||||||
Core::Id GitVersionControl::id() const
|
Core::Id GitVersionControl::id() const
|
||||||
{
|
{
|
||||||
return VcsBase::Constants::VCS_ID_GIT;
|
return Core::Id(VcsBase::Constants::VCS_ID_GIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GitVersionControl::isConfigured() const
|
bool GitVersionControl::isConfigured() const
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ Core::IEditor *GLSLEditorEditable::duplicate(QWidget *parent)
|
|||||||
|
|
||||||
Core::Id GLSLEditorEditable::id() const
|
Core::Id GLSLEditorEditable::id() const
|
||||||
{
|
{
|
||||||
return GLSLEditor::Constants::C_GLSLEDITOR_ID;
|
return Core::Id(GLSLEditor::Constants::C_GLSLEDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GLSLEditorEditable::open(QString *errorString, const QString &fileName, const QString &realFileName)
|
bool GLSLEditorEditable::open(QString *errorString, const QString &fileName, const QString &realFileName)
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ GLSLEditorFactory::GLSLEditorFactory(QObject *parent)
|
|||||||
|
|
||||||
Core::Id GLSLEditorFactory::id() const
|
Core::Id GLSLEditorFactory::id() const
|
||||||
{
|
{
|
||||||
return C_GLSLEDITOR_ID;
|
return Core::Id(C_GLSLEDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString GLSLEditorFactory::displayName() const
|
QString GLSLEditorFactory::displayName() const
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ QStringList ImageViewerFactory::mimeTypes() const
|
|||||||
|
|
||||||
Core::Id ImageViewerFactory::id() const
|
Core::Id ImageViewerFactory::id() const
|
||||||
{
|
{
|
||||||
return Constants::IMAGEVIEWER_ID;
|
return Core::Id(Constants::IMAGEVIEWER_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ImageViewerFactory::displayName() const
|
QString ImageViewerFactory::displayName() const
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ QString MercurialControl::displayName() const
|
|||||||
|
|
||||||
Core::Id MercurialControl::id() const
|
Core::Id MercurialControl::id() const
|
||||||
{
|
{
|
||||||
return VcsBase::Constants::VCS_ID_MERCURIAL;
|
return Core::Id(VcsBase::Constants::VCS_ID_MERCURIAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MercurialControl::managesDirectory(const QString &directory, QString *topLevel) const
|
bool MercurialControl::managesDirectory(const QString &directory, QString *topLevel) const
|
||||||
|
|||||||
@@ -1172,7 +1172,7 @@ Core::IEditor *PerforcePlugin::showOutputInEditor(const QString &title, const QS
|
|||||||
{
|
{
|
||||||
const VcsBase::VcsBaseEditorParameters *params = findType(editorType);
|
const VcsBase::VcsBaseEditorParameters *params = findType(editorType);
|
||||||
QTC_ASSERT(params, return 0);
|
QTC_ASSERT(params, return 0);
|
||||||
const Core::Id id(params->id);
|
const Core::Id id = Core::Id(QByteArray(params->id));
|
||||||
if (Perforce::Constants::debug)
|
if (Perforce::Constants::debug)
|
||||||
qDebug() << "PerforcePlugin::showOutputInEditor" << title << id.name()
|
qDebug() << "PerforcePlugin::showOutputInEditor" << title << id.name()
|
||||||
<< "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
<< "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ QString PerforceVersionControl::displayName() const
|
|||||||
|
|
||||||
Core::Id PerforceVersionControl::id() const
|
Core::Id PerforceVersionControl::id() const
|
||||||
{
|
{
|
||||||
return VcsBase::Constants::VCS_ID_PERFORCE;
|
return Core::Id(VcsBase::Constants::VCS_ID_PERFORCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PerforceVersionControl::isConfigured() const
|
bool PerforceVersionControl::isConfigured() const
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ void IDevice::fromMap(const QVariantMap &map)
|
|||||||
{
|
{
|
||||||
d->type = typeFromMap(map);
|
d->type = typeFromMap(map);
|
||||||
d->displayName = map.value(QLatin1String(DisplayNameKey)).toString();
|
d->displayName = map.value(QLatin1String(DisplayNameKey)).toString();
|
||||||
d->id = Core::Id(map.value(QLatin1String(IdKey), newId().name()).toByteArray().constData());
|
d->id = Core::Id(map.value(QLatin1String(IdKey), newId().name()).toByteArray());
|
||||||
d->origin = static_cast<Origin>(map.value(QLatin1String(OriginKey), ManuallyAdded).toInt());
|
d->origin = static_cast<Origin>(map.value(QLatin1String(OriginKey), ManuallyAdded).toInt());
|
||||||
|
|
||||||
d->sshParameters.host = map.value(HostKey).toString();
|
d->sshParameters.host = map.value(HostKey).toString();
|
||||||
|
|||||||
@@ -401,7 +401,7 @@ int FolderNavigationWidgetFactory::priority() const
|
|||||||
|
|
||||||
Core::Id FolderNavigationWidgetFactory::id() const
|
Core::Id FolderNavigationWidgetFactory::id() const
|
||||||
{
|
{
|
||||||
return "File System";
|
return Core::Id("File System");
|
||||||
}
|
}
|
||||||
|
|
||||||
QKeySequence FolderNavigationWidgetFactory::activationSequence() const
|
QKeySequence FolderNavigationWidgetFactory::activationSequence() const
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ public:
|
|||||||
m_mustNotify(false)
|
m_mustNotify(false)
|
||||||
{
|
{
|
||||||
if (!id.isValid())
|
if (!id.isValid())
|
||||||
m_id = Core::Id(QUuid::createUuid().toString().toLatin1().constData());
|
m_id = Core::Id(QUuid::createUuid().toString().toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
QString m_displayName;
|
QString m_displayName;
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ const Core::Id DeviceTypeKitInformation::deviceTypeId(const Kit *k)
|
|||||||
{
|
{
|
||||||
if (!k)
|
if (!k)
|
||||||
return Core::Id();
|
return Core::Id();
|
||||||
return Core::Id(k->value(Core::Id(DEVICETYPE_INFORMATION)).toByteArray().constData());
|
return Core::Id(k->value(Core::Id(DEVICETYPE_INFORMATION)).toByteArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceTypeKitInformation::setDeviceTypeId(Kit *k, Core::Id type)
|
void DeviceTypeKitInformation::setDeviceTypeId(Kit *k, Core::Id type)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ QStringList ProjectFileFactory::mimeTypes() const
|
|||||||
|
|
||||||
Core::Id ProjectFileFactory::id() const
|
Core::Id ProjectFileFactory::id() const
|
||||||
{
|
{
|
||||||
return Constants::FILE_FACTORY_ID;
|
return Core::Id(Constants::FILE_FACTORY_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ProjectFileFactory::displayName() const
|
QString ProjectFileFactory::displayName() const
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ QVariantMap ProjectConfiguration::toMap() const
|
|||||||
|
|
||||||
bool ProjectConfiguration::fromMap(const QVariantMap &map)
|
bool ProjectConfiguration::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
m_id = Core::Id(map.value(QLatin1String(CONFIGURATION_ID_KEY), QByteArray()).toByteArray().constData());
|
m_id = Core::Id(map.value(QLatin1String(CONFIGURATION_ID_KEY), QByteArray()).toByteArray());
|
||||||
m_displayName = map.value(QLatin1String(DISPLAY_NAME_KEY), QString()).toString();
|
m_displayName = map.value(QLatin1String(DISPLAY_NAME_KEY), QString()).toString();
|
||||||
m_defaultDisplayName = map.value(QLatin1String(DEFAULT_DISPLAY_NAME_KEY),
|
m_defaultDisplayName = map.value(QLatin1String(DEFAULT_DISPLAY_NAME_KEY),
|
||||||
m_defaultDisplayName.isEmpty() ?
|
m_defaultDisplayName.isEmpty() ?
|
||||||
|
|||||||
@@ -558,14 +558,14 @@ void TaskWindow::updateCategoriesMenu()
|
|||||||
action->setCheckable(true);
|
action->setCheckable(true);
|
||||||
action->setText(displayName);
|
action->setText(displayName);
|
||||||
action->setData(categoryId);
|
action->setData(categoryId);
|
||||||
action->setChecked(!filteredCategories.contains(Core::Id(categoryId.constData())));
|
action->setChecked(!filteredCategories.contains(Core::Id(categoryId)));
|
||||||
d->m_categoriesMenu->addAction(action);
|
d->m_categoriesMenu->addAction(action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskWindow::filterCategoryTriggered(QAction *action)
|
void TaskWindow::filterCategoryTriggered(QAction *action)
|
||||||
{
|
{
|
||||||
Core::Id categoryId(action->data().toByteArray().constData());
|
Core::Id categoryId(action->data().toByteArray());
|
||||||
QTC_CHECK(categoryId.uniqueIdentifier() != 0);
|
QTC_CHECK(categoryId.uniqueIdentifier() != 0);
|
||||||
|
|
||||||
setCategoryVisibility(categoryId, action->isChecked());
|
setCategoryVisibility(categoryId, action->isChecked());
|
||||||
|
|||||||
@@ -580,7 +580,7 @@ Core::IEditor *QmlJSEditorEditable::duplicate(QWidget *parent)
|
|||||||
|
|
||||||
Core::Id QmlJSEditorEditable::id() const
|
Core::Id QmlJSEditorEditable::id() const
|
||||||
{
|
{
|
||||||
return QmlJSEditor::Constants::C_QMLJSEDITOR_ID;
|
return Core::Id(QmlJSEditor::Constants::C_QMLJSEDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QmlJSEditorEditable::open(QString *errorString, const QString &fileName, const QString &realFileName)
|
bool QmlJSEditorEditable::open(QString *errorString, const QString &fileName, const QString &realFileName)
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ Core::Id QmlJSEditorEditable::preferredModeType() const
|
|||||||
// have the user also access to this failsafe setting.
|
// have the user also access to this failsafe setting.
|
||||||
if (editorWidget()->mimeType() == QLatin1String(QmlJSTools::Constants::QML_MIMETYPE)
|
if (editorWidget()->mimeType() == QLatin1String(QmlJSTools::Constants::QML_MIMETYPE)
|
||||||
&& openInDesignMode())
|
&& openInDesignMode())
|
||||||
return Core::Constants::MODE_DESIGN_TYPE;
|
return Core::Id(Core::Constants::MODE_DESIGN_TYPE);
|
||||||
return Core::Id();
|
return Core::Id();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ QmlJSEditorFactory::QmlJSEditorFactory(QObject *parent)
|
|||||||
|
|
||||||
Core::Id QmlJSEditorFactory::id() const
|
Core::Id QmlJSEditorFactory::id() const
|
||||||
{
|
{
|
||||||
return C_QMLJSEDITOR_ID;
|
return Core::Id(C_QMLJSEDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QmlJSEditorFactory::displayName() const
|
QString QmlJSEditorFactory::displayName() const
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ QmlProfilerTool::~QmlProfilerTool()
|
|||||||
|
|
||||||
Core::Id QmlProfilerTool::id() const
|
Core::Id QmlProfilerTool::id() const
|
||||||
{
|
{
|
||||||
return "QmlProfiler";
|
return Core::Id("QmlProfiler");
|
||||||
}
|
}
|
||||||
|
|
||||||
RunMode QmlProfilerTool::runMode() const
|
RunMode QmlProfilerTool::runMode() const
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ Core::IEditor *ProFileEditor::duplicate(QWidget *parent)
|
|||||||
|
|
||||||
Core::Id ProFileEditor::id() const
|
Core::Id ProFileEditor::id() const
|
||||||
{
|
{
|
||||||
return Qt4ProjectManager::Constants::PROFILE_EDITOR_ID;
|
return Core::Id(Qt4ProjectManager::Constants::PROFILE_EDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ ProFileEditorFactory::~ProFileEditorFactory()
|
|||||||
|
|
||||||
Core::Id ProFileEditorFactory::id() const
|
Core::Id ProFileEditorFactory::id() const
|
||||||
{
|
{
|
||||||
return Qt4ProjectManager::Constants::PROFILE_EDITOR_ID;
|
return Core::Id(Qt4ProjectManager::Constants::PROFILE_EDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ProFileEditorFactory::displayName() const
|
QString ProFileEditorFactory::displayName() const
|
||||||
|
|||||||
@@ -69,12 +69,12 @@ using namespace ProjectExplorer;
|
|||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const char * const QMAKE_BS_ID("QtProjectManager.QMakeBuildStep");
|
const char QMAKE_BS_ID[] = "QtProjectManager.QMakeBuildStep";
|
||||||
|
|
||||||
const char * const QMAKE_ARGUMENTS_KEY("QtProjectManager.QMakeBuildStep.QMakeArguments");
|
const char QMAKE_ARGUMENTS_KEY[] = "QtProjectManager.QMakeBuildStep.QMakeArguments";
|
||||||
const char * const QMAKE_FORCED_KEY("QtProjectManager.QMakeBuildStep.QMakeForced");
|
const char QMAKE_FORCED_KEY[] = "QtProjectManager.QMakeBuildStep.QMakeForced";
|
||||||
const char * const QMAKE_QMLDEBUGLIBAUTO_KEY("QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto");
|
const char QMAKE_QMLDEBUGLIBAUTO_KEY[] = "QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto";
|
||||||
const char * const QMAKE_QMLDEBUGLIB_KEY("QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary");
|
const char QMAKE_QMLDEBUGLIB_KEY[] = "QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary";
|
||||||
}
|
}
|
||||||
|
|
||||||
QMakeStep::QMakeStep(BuildStepList *bsl) :
|
QMakeStep::QMakeStep(BuildStepList *bsl) :
|
||||||
|
|||||||
@@ -54,14 +54,14 @@ using namespace QtSupport;
|
|||||||
using namespace QtSupport::Internal;
|
using namespace QtSupport::Internal;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const char * const CUSTOM_EXECUTABLE_ID("ProjectExplorer.CustomExecutableRunConfiguration");
|
const char CUSTOM_EXECUTABLE_ID[] = "ProjectExplorer.CustomExecutableRunConfiguration";
|
||||||
|
|
||||||
const char * const EXECUTABLE_KEY("ProjectExplorer.CustomExecutableRunConfiguration.Executable");
|
const char EXECUTABLE_KEY[] = "ProjectExplorer.CustomExecutableRunConfiguration.Executable";
|
||||||
const char * const ARGUMENTS_KEY("ProjectExplorer.CustomExecutableRunConfiguration.Arguments");
|
const char ARGUMENTS_KEY[] = "ProjectExplorer.CustomExecutableRunConfiguration.Arguments";
|
||||||
const char * const WORKING_DIRECTORY_KEY("ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory");
|
const char WORKING_DIRECTORY_KEY[] = "ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory";
|
||||||
const char * const USE_TERMINAL_KEY("ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal");
|
const char USE_TERMINAL_KEY[] = "ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal";
|
||||||
const char * const USER_ENVIRONMENT_CHANGES_KEY("ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges");
|
const char USER_ENVIRONMENT_CHANGES_KEY[] = "ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges";
|
||||||
const char * const BASE_ENVIRONMENT_BASE_KEY("ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase");
|
const char BASE_ENVIRONMENT_BASE_KEY[] = "ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CustomExecutableRunConfiguration::ctor()
|
void CustomExecutableRunConfiguration::ctor()
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ ResourceEditorFactory::ResourceEditorFactory(ResourceEditorPlugin *plugin) :
|
|||||||
|
|
||||||
Core::Id ResourceEditorFactory::id() const
|
Core::Id ResourceEditorFactory::id() const
|
||||||
{
|
{
|
||||||
return RESOURCEEDITOR_ID;
|
return Core::Id(RESOURCEEDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ResourceEditorFactory::displayName() const
|
QString ResourceEditorFactory::displayName() const
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ QString SubversionControl::displayName() const
|
|||||||
|
|
||||||
Core::Id SubversionControl::id() const
|
Core::Id SubversionControl::id() const
|
||||||
{
|
{
|
||||||
return VcsBase::Constants::VCS_ID_SUBVERSION;
|
return Core::Id(VcsBase::Constants::VCS_ID_SUBVERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SubversionControl::isConfigured() const
|
bool SubversionControl::isConfigured() const
|
||||||
|
|||||||
@@ -1145,7 +1145,7 @@ Core::IEditor *SubversionPlugin::showOutputInEditor(const QString &title, const
|
|||||||
{
|
{
|
||||||
const VcsBase::VcsBaseEditorParameters *params = findType(editorType);
|
const VcsBase::VcsBaseEditorParameters *params = findType(editorType);
|
||||||
QTC_ASSERT(params, return 0);
|
QTC_ASSERT(params, return 0);
|
||||||
const Core::Id id = params->id;
|
const Core::Id id = Core::Id(QByteArray(params->id));
|
||||||
if (Subversion::Constants::debug)
|
if (Subversion::Constants::debug)
|
||||||
qDebug() << "SubversionPlugin::showOutputInEditor" << title << id.name()
|
qDebug() << "SubversionPlugin::showOutputInEditor" << title << id.name()
|
||||||
<< "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
<< "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ QStringList TaskFileFactory::mimeTypes() const
|
|||||||
|
|
||||||
Core::Id TaskFileFactory::id() const
|
Core::Id TaskFileFactory::id() const
|
||||||
{
|
{
|
||||||
return "ProjectExplorer.TaskFileFactory";
|
return Core::Id("ProjectExplorer.TaskFileFactory");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString TaskFileFactory::displayName() const
|
QString TaskFileFactory::displayName() const
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ Core::IEditor *PlainTextEditor::duplicate(QWidget *parent)
|
|||||||
|
|
||||||
Core::Id PlainTextEditor::id() const
|
Core::Id PlainTextEditor::id() const
|
||||||
{
|
{
|
||||||
return Core::Constants::K_DEFAULT_TEXT_EDITOR_ID;
|
return Core::Id(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlainTextEditorWidget::unCommentSelection()
|
void PlainTextEditorWidget::unCommentSelection()
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ PlainTextEditorFactory::~PlainTextEditorFactory()
|
|||||||
|
|
||||||
Core::Id PlainTextEditorFactory::id() const
|
Core::Id PlainTextEditorFactory::id() const
|
||||||
{
|
{
|
||||||
return Core::Constants::K_DEFAULT_TEXT_EDITOR_ID;
|
return Core::Id(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString PlainTextEditorFactory::displayName() const
|
QString PlainTextEditorFactory::displayName() const
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ SnippetEditor::SnippetEditor(SnippetEditorWidget *editor)
|
|||||||
|
|
||||||
Core::Id SnippetEditor::id() const
|
Core::Id SnippetEditor::id() const
|
||||||
{
|
{
|
||||||
return Constants::SNIPPET_EDITOR_ID;
|
return Core::Id(Constants::SNIPPET_EDITOR_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
SnippetEditorWidget::SnippetEditorWidget(QWidget *parent) : BaseTextEditorWidget(parent)
|
SnippetEditorWidget::SnippetEditorWidget(QWidget *parent) : BaseTextEditorWidget(parent)
|
||||||
|
|||||||
@@ -516,7 +516,7 @@ CallgrindTool::~CallgrindTool()
|
|||||||
|
|
||||||
Core::Id CallgrindTool::id() const
|
Core::Id CallgrindTool::id() const
|
||||||
{
|
{
|
||||||
return "Callgrind";
|
return Core::Id("Callgrind");
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::RunMode CallgrindTool::runMode() const
|
ProjectExplorer::RunMode CallgrindTool::runMode() const
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ void MemcheckTool::maybeActiveRunConfigurationChanged()
|
|||||||
|
|
||||||
Core::Id MemcheckTool::id() const
|
Core::Id MemcheckTool::id() const
|
||||||
{
|
{
|
||||||
return "Memcheck";
|
return Core::Id("Memcheck");
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::RunMode MemcheckTool::runMode() const
|
ProjectExplorer::RunMode MemcheckTool::runMode() const
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public:
|
|||||||
|
|
||||||
BaseVcsEditorFactoryPrivate::BaseVcsEditorFactoryPrivate(const VcsBaseEditorParameters *t) :
|
BaseVcsEditorFactoryPrivate::BaseVcsEditorFactoryPrivate(const VcsBaseEditorParameters *t) :
|
||||||
m_type(t),
|
m_type(t),
|
||||||
m_id(t->id),
|
m_id(QByteArray(t->id)),
|
||||||
m_mimeTypes(QStringList(QLatin1String(t->mimeType))),
|
m_mimeTypes(QStringList(QLatin1String(t->mimeType))),
|
||||||
m_editorHandler(new TextEditor::TextEditorActionHandler(t->context))
|
m_editorHandler(new TextEditor::TextEditorActionHandler(t->context))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
|
|
||||||
BaseVcsSubmitEditorFactoryPrivate::BaseVcsSubmitEditorFactoryPrivate(const VcsBaseSubmitEditorParameters *parameters) :
|
BaseVcsSubmitEditorFactoryPrivate::BaseVcsSubmitEditorFactoryPrivate(const VcsBaseSubmitEditorParameters *parameters) :
|
||||||
m_parameters(parameters),
|
m_parameters(parameters),
|
||||||
m_id(parameters->id),
|
m_id(QByteArray(parameters->id)),
|
||||||
m_displayName(QLatin1String(parameters->displayName)),
|
m_displayName(QLatin1String(parameters->displayName)),
|
||||||
m_mimeTypes(QLatin1String(parameters->mimeType))
|
m_mimeTypes(QLatin1String(parameters->mimeType))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ private:
|
|||||||
VcsBaseEditor::VcsBaseEditor(VcsBaseEditorWidget *widget,
|
VcsBaseEditor::VcsBaseEditor(VcsBaseEditorWidget *widget,
|
||||||
const VcsBaseEditorParameters *type) :
|
const VcsBaseEditorParameters *type) :
|
||||||
BaseTextEditor(widget),
|
BaseTextEditor(widget),
|
||||||
m_id(type->id),
|
m_id(QByteArray(type->id)),
|
||||||
m_temporary(false)
|
m_temporary(false)
|
||||||
{
|
{
|
||||||
setContext(Core::Context(type->context, TextEditor::Constants::C_TEXTEDITOR));
|
setContext(Core::Context(type->context, TextEditor::Constants::C_TEXTEDITOR));
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ Core::IEditor *VcsBaseSubmitEditor::duplicate(QWidget * /*parent*/)
|
|||||||
|
|
||||||
Core::Id VcsBaseSubmitEditor::id() const
|
Core::Id VcsBaseSubmitEditor::id() const
|
||||||
{
|
{
|
||||||
return d->m_parameters->id;
|
return Core::Id(QByteArray(d->m_parameters->id));
|
||||||
}
|
}
|
||||||
|
|
||||||
static QToolBar *createToolBar(const QWidget *someWidget, QAction *submitAction, QAction *diffAction)
|
static QToolBar *createToolBar(const QWidget *someWidget, QAction *submitAction, QAction *diffAction)
|
||||||
|
|||||||
Reference in New Issue
Block a user