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