forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.4'
Change-Id: I6791ba0a70724b54b48f8a71e854ce9aad09923e
This commit is contained in:
@@ -26,8 +26,7 @@
|
|||||||
// Changes will be lost.
|
// Changes will be lost.
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef CPLUSPLUS_AST_PATTERN_BUILDER_H
|
#pragma once
|
||||||
#define CPLUSPLUS_AST_PATTERN_BUILDER_H
|
|
||||||
|
|
||||||
#include "CPlusPlusForwardDeclarations.h"
|
#include "CPlusPlusForwardDeclarations.h"
|
||||||
#include "AST.h"
|
#include "AST.h"
|
||||||
@@ -1385,5 +1384,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // end of namespace CPlusPlus
|
} // end of namespace CPlusPlus
|
||||||
|
|
||||||
#endif // CPLUSPLUS_AST_PATTERN_BUILDER_H
|
|
||||||
|
@@ -203,11 +203,19 @@ QString DiffEditorDocument::fallbackSaveAsPath() const
|
|||||||
return QDir::homePath();
|
return QDir::homePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DiffEditorDocument::isSaveAsAllowed() const
|
||||||
|
{
|
||||||
|
return !isReloading();
|
||||||
|
}
|
||||||
|
|
||||||
bool DiffEditorDocument::save(QString *errorString, const QString &fileName, bool autoSave)
|
bool DiffEditorDocument::save(QString *errorString, const QString &fileName, bool autoSave)
|
||||||
{
|
{
|
||||||
Q_UNUSED(errorString)
|
Q_UNUSED(errorString)
|
||||||
Q_UNUSED(autoSave)
|
Q_UNUSED(autoSave)
|
||||||
|
|
||||||
|
if (isReloading())
|
||||||
|
return false;
|
||||||
|
|
||||||
const bool ok = write(fileName, format(), plainText(), errorString);
|
const bool ok = write(fileName, format(), plainText(), errorString);
|
||||||
|
|
||||||
if (!ok)
|
if (!ok)
|
||||||
@@ -330,6 +338,7 @@ void DiffEditorDocument::beginReload()
|
|||||||
{
|
{
|
||||||
emit aboutToReload();
|
emit aboutToReload();
|
||||||
m_isReloading = true;
|
m_isReloading = true;
|
||||||
|
emit changed();
|
||||||
const bool blocked = blockSignals(true);
|
const bool blocked = blockSignals(true);
|
||||||
setDiffFiles(QList<FileData>(), QString());
|
setDiffFiles(QList<FileData>(), QString());
|
||||||
setDescription(QString());
|
setDescription(QString());
|
||||||
@@ -339,6 +348,7 @@ void DiffEditorDocument::beginReload()
|
|||||||
void DiffEditorDocument::endReload(bool success)
|
void DiffEditorDocument::endReload(bool success)
|
||||||
{
|
{
|
||||||
m_isReloading = false;
|
m_isReloading = false;
|
||||||
|
emit changed();
|
||||||
emit reloadFinished(success);
|
emit reloadFinished(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -70,7 +70,7 @@ public:
|
|||||||
QString fallbackSaveAsPath() const override;
|
QString fallbackSaveAsPath() const override;
|
||||||
QString fallbackSaveAsFileName() const override;
|
QString fallbackSaveAsFileName() const override;
|
||||||
|
|
||||||
bool isSaveAsAllowed() const override { return true; }
|
bool isSaveAsAllowed() const override;
|
||||||
bool save(QString *errorString, const QString &fileName, bool autoSave) override;
|
bool save(QString *errorString, const QString &fileName, bool autoSave) override;
|
||||||
void reload();
|
void reload();
|
||||||
bool reload(QString *errorString, ReloadFlag flag, ChangeType type) override;
|
bool reload(QString *errorString, ReloadFlag flag, ChangeType type) override;
|
||||||
|
@@ -538,6 +538,19 @@ IRunConfigurationAspect *IRunControlFactory::createRunConfigurationAspect(RunCon
|
|||||||
than it needs to be.
|
than it needs to be.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
const char PRIORITY_KEY[] = "RunControlFactoryPriority";
|
||||||
|
|
||||||
|
int ProjectExplorer::IRunControlFactory::priority() const
|
||||||
|
{
|
||||||
|
return property(PRIORITY_KEY).toInt(); // 0 by default.
|
||||||
|
}
|
||||||
|
|
||||||
|
void IRunControlFactory::setPriority(int priority)
|
||||||
|
{
|
||||||
|
setProperty(PRIORITY_KEY, priority);
|
||||||
|
}
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
enum class RunWorkerState
|
enum class RunWorkerState
|
||||||
|
@@ -341,6 +341,10 @@ public:
|
|||||||
virtual RunControl *create(RunConfiguration *runConfiguration, Core::Id runMode, QString *errorMessage);
|
virtual RunControl *create(RunConfiguration *runConfiguration, Core::Id runMode, QString *errorMessage);
|
||||||
|
|
||||||
virtual IRunConfigurationAspect *createRunConfigurationAspect(RunConfiguration *rc);
|
virtual IRunConfigurationAspect *createRunConfigurationAspect(RunConfiguration *rc);
|
||||||
|
|
||||||
|
int priority() const;
|
||||||
|
protected:
|
||||||
|
void setPriority(int priority); // Higher values will be preferred.
|
||||||
};
|
};
|
||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT RunConfigWidget : public QWidget
|
class PROJECTEXPLORER_EXPORT RunConfigWidget : public QWidget
|
||||||
|
@@ -1246,8 +1246,7 @@ void generateASTVisitor_H(const Snapshot &, const QDir &cplusplusDir,
|
|||||||
QTextStream out(&file);
|
QTextStream out(&file);
|
||||||
out << copyrightHeader <<
|
out << copyrightHeader <<
|
||||||
"\n"
|
"\n"
|
||||||
"#ifndef CPLUSPLUS_ASTVISITOR_H\n"
|
"#pragma once\n"
|
||||||
"#define CPLUSPLUS_ASTVISITOR_H\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
"#include \"CPlusPlusForwardDeclarations.h\"\n"
|
"#include \"CPlusPlusForwardDeclarations.h\"\n"
|
||||||
"#include \"ASTfwd.h\"\n"
|
"#include \"ASTfwd.h\"\n"
|
||||||
@@ -1317,9 +1316,7 @@ void generateASTVisitor_H(const Snapshot &, const QDir &cplusplusDir,
|
|||||||
" TranslationUnit *_translationUnit;\n"
|
" TranslationUnit *_translationUnit;\n"
|
||||||
"};\n"
|
"};\n"
|
||||||
"\n"
|
"\n"
|
||||||
"} // namespace CPlusPlus\n"
|
"} // namespace CPlusPlus\n";
|
||||||
"\n"
|
|
||||||
"#endif // CPLUSPLUS_ASTVISITOR_H\n";
|
|
||||||
|
|
||||||
closeAndPrintFilePath(file);
|
closeAndPrintFilePath(file);
|
||||||
}
|
}
|
||||||
@@ -1339,8 +1336,7 @@ void generateASTMatcher_H(const Snapshot &, const QDir &cplusplusDir,
|
|||||||
QTextStream out(&file);
|
QTextStream out(&file);
|
||||||
out << copyrightHeader <<
|
out << copyrightHeader <<
|
||||||
"\n"
|
"\n"
|
||||||
"#ifndef ASTMATCHER_H\n"
|
"#pragma once\n"
|
||||||
"#define ASTMATCHER_H\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
"#include \"ASTfwd.h\"\n"
|
"#include \"ASTfwd.h\"\n"
|
||||||
"\n"
|
"\n"
|
||||||
@@ -1360,9 +1356,7 @@ void generateASTMatcher_H(const Snapshot &, const QDir &cplusplusDir,
|
|||||||
out <<
|
out <<
|
||||||
"};\n"
|
"};\n"
|
||||||
"\n"
|
"\n"
|
||||||
"} // namespace CPlusPlus\n"
|
"} // namespace CPlusPlus\n";
|
||||||
"\n"
|
|
||||||
"#endif // CPLUSPLUS_ASTMATCHER_H\n";
|
|
||||||
|
|
||||||
closeAndPrintFilePath(file);
|
closeAndPrintFilePath(file);
|
||||||
}
|
}
|
||||||
@@ -1574,8 +1568,7 @@ void generateASTPatternBuilder_h(const QDir &cplusplusDir)
|
|||||||
out
|
out
|
||||||
<< copyrightHeader
|
<< copyrightHeader
|
||||||
<< generatedHeader
|
<< generatedHeader
|
||||||
<< "#ifndef CPLUSPLUS_AST_PATTERN_BUILDER_H" << endl
|
<< "#pragma once" << endl
|
||||||
<< "#define CPLUSPLUS_AST_PATTERN_BUILDER_H" << endl
|
|
||||||
<< endl
|
<< endl
|
||||||
<< "#include \"CPlusPlusForwardDeclarations.h\"" << endl
|
<< "#include \"CPlusPlusForwardDeclarations.h\"" << endl
|
||||||
<< "#include \"AST.h\"" << endl
|
<< "#include \"AST.h\"" << endl
|
||||||
@@ -1683,9 +1676,7 @@ void generateASTPatternBuilder_h(const QDir &cplusplusDir)
|
|||||||
out
|
out
|
||||||
<< "};" << endl
|
<< "};" << endl
|
||||||
<< endl
|
<< endl
|
||||||
<< "} // end of namespace CPlusPlus" << endl
|
<< "} // end of namespace CPlusPlus" << endl;
|
||||||
<< endl
|
|
||||||
<< "#endif // CPLUSPLUS_AST_PATTERN_BUILDER_H" << endl;
|
|
||||||
|
|
||||||
closeAndPrintFilePath(file);
|
closeAndPrintFilePath(file);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user