refactor: name project options
fix: chinese translation for project options
This commit is contained in:
parent
648e555fc5
commit
d3f2cd1dc1
|
@ -43,8 +43,8 @@ Compiler::Compiler(const QString &filename, bool onlyCheckSyntax):
|
||||||
mOnlyCheckSyntax{onlyCheckSyntax},
|
mOnlyCheckSyntax{onlyCheckSyntax},
|
||||||
mFilename{filename},
|
mFilename{filename},
|
||||||
mRebuild{false},
|
mRebuild{false},
|
||||||
mForceEnglishOutput{false},
|
mParserForFile{},
|
||||||
mParserForFile()
|
mForceEnglishOutput{false}
|
||||||
{
|
{
|
||||||
getParserForFile(filename);
|
getParserForFile(filename);
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ void ProjectCompiler::createStandardMakeFile()
|
||||||
QFile file(mProject->makeFileName());
|
QFile file(mProject->makeFileName());
|
||||||
bool genModuleDef;
|
bool genModuleDef;
|
||||||
newMakeFile(file, genModuleDef);
|
newMakeFile(file, genModuleDef);
|
||||||
QString executable = extractRelativePath(mProject->makeFileName(), mProject->executable());
|
QString executable = extractRelativePath(mProject->makeFileName(), mProject->outputFilename());
|
||||||
QString exeTarget = escapeFilenameForMakefileTarget(executable);
|
QString exeTarget = escapeFilenameForMakefileTarget(executable);
|
||||||
QString exeCommand = escapeArgumentForMakefileRecipe(executable, false);
|
QString exeCommand = escapeArgumentForMakefileRecipe(executable, false);
|
||||||
writeln(file, exeTarget + ": $(OBJ)\n");
|
writeln(file, exeTarget + ": $(OBJ)\n");
|
||||||
|
@ -73,12 +73,12 @@ void ProjectCompiler::createStaticMakeFile()
|
||||||
{
|
{
|
||||||
QFile file(mProject->makeFileName());
|
QFile file(mProject->makeFileName());
|
||||||
newMakeFile(file);
|
newMakeFile(file);
|
||||||
QString executable = extractRelativePath(mProject->makeFileName(), mProject->executable());
|
QString libFilename = extractRelativePath(mProject->makeFileName(), mProject->outputFilename());
|
||||||
QString exeTarget = escapeFilenameForMakefileTarget(executable);
|
QString libTarget = escapeFilenameForMakefileTarget(libFilename);
|
||||||
QString exeCommand = escapeArgumentForMakefileRecipe(executable, false);
|
QString libCommand = escapeArgumentForMakefileRecipe(libFilename, false);
|
||||||
writeln(file, exeTarget + ": $(OBJ)");
|
writeln(file, libTarget + ": $(OBJ)");
|
||||||
writeln(file, "\tar r " + exeCommand + " $(LINKOBJ)");
|
writeln(file, "\tar r " + libCommand + " $(LINKOBJ)");
|
||||||
writeln(file, "\tranlib " + exeCommand);
|
writeln(file, "\tranlib " + libCommand);
|
||||||
writeMakeObjFilesRules(file);
|
writeMakeObjFilesRules(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,21 +87,21 @@ void ProjectCompiler::createDynamicMakeFile()
|
||||||
QFile file(mProject->makeFileName());
|
QFile file(mProject->makeFileName());
|
||||||
bool genModuleDef;
|
bool genModuleDef;
|
||||||
newMakeFile(file, genModuleDef);
|
newMakeFile(file, genModuleDef);
|
||||||
QString executable = extractRelativePath(mProject->makeFileName(), mProject->executable());
|
QString dynamicLibFilename = extractRelativePath(mProject->makeFileName(), mProject->outputFilename());
|
||||||
QString exeTarget = escapeFilenameForMakefileTarget(executable);
|
QString dynamicLibTarget = escapeFilenameForMakefileTarget(dynamicLibFilename);
|
||||||
QString exeCommand = escapeArgumentForMakefileRecipe(executable, false);
|
QString dynamicLibCommand = escapeArgumentForMakefileRecipe(dynamicLibFilename, false);
|
||||||
writeln(file, exeTarget + ": $(DEF) $(OBJ)");
|
writeln(file, dynamicLibTarget + ": $(DEF) $(OBJ)");
|
||||||
if (genModuleDef) {
|
if (genModuleDef) {
|
||||||
if (mProject->options().isCpp) {
|
if (mProject->options().isCpp) {
|
||||||
writeln(file, "\t$(CXX) -mdll $(LINKOBJ) -o " + exeCommand + " $(LIBS) $(DEF) -Wl,--output-def,$(OUTPUT_DEF),--out-implib,$(STATIC)");
|
writeln(file, "\t$(CXX) -mdll $(LINKOBJ) -o " + dynamicLibCommand + " $(LIBS) $(DEF) -Wl,--output-def,$(OUTPUT_DEF),--out-implib,$(STATIC)");
|
||||||
} else {
|
} else {
|
||||||
writeln(file, "\t$(CC) -mdll $(LINKOBJ) -o " + exeCommand + " $(LIBS) $(DEF) -Wl,--output-def,$(OUTPUT_DEF),--out-implib,$(STATIC)");
|
writeln(file, "\t$(CC) -mdll $(LINKOBJ) -o " + dynamicLibCommand + " $(LIBS) $(DEF) -Wl,--output-def,$(OUTPUT_DEF),--out-implib,$(STATIC)");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (mProject->options().isCpp) {
|
if (mProject->options().isCpp) {
|
||||||
writeln(file, "\t$(CXX) -mdll $(LINKOBJ) -o " + exeCommand + " $(LIBS) $(DEF) -Wl,--out-implib,$(STATIC)");
|
writeln(file, "\t$(CXX) -mdll $(LINKOBJ) -o " + dynamicLibCommand + " $(LIBS) $(DEF) -Wl,--out-implib,$(STATIC)");
|
||||||
} else {
|
} else {
|
||||||
writeln(file, "\t$(CC) -mdll $(LINKOBJ) -o " + exeCommand + " $(LIBS) $(DEF) -Wl,--out-implib,$(STATIC)");
|
writeln(file, "\t$(CC) -mdll $(LINKOBJ) -o " + dynamicLibCommand + " $(LIBS) $(DEF) -Wl,--out-implib,$(STATIC)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
writeMakeObjFilesRules(file);
|
writeMakeObjFilesRules(file);
|
||||||
|
@ -116,12 +116,12 @@ void ProjectCompiler::newMakeFile(QFile &file)
|
||||||
void ProjectCompiler::newMakeFile(QFile& file, bool &genModuleDef)
|
void ProjectCompiler::newMakeFile(QFile& file, bool &genModuleDef)
|
||||||
{
|
{
|
||||||
// Create OBJ output directory
|
// Create OBJ output directory
|
||||||
if (!mProject->options().objectOutput.isEmpty()) {
|
if (!mProject->options().folderForObjFiles.isEmpty()) {
|
||||||
QDir(mProject->directory()).mkpath(mProject->options().objectOutput);
|
QDir(mProject->directory()).mkpath(mProject->options().folderForObjFiles);
|
||||||
}
|
}
|
||||||
// Create executable output directory
|
// Create executable output directory
|
||||||
if (!mProject->options().exeOutput.isEmpty()) {
|
if (!mProject->options().folderForOutput.isEmpty()) {
|
||||||
QDir(mProject->directory()).mkpath(mProject->options().exeOutput);
|
QDir(mProject->directory()).mkpath(mProject->options().folderForOutput);
|
||||||
}
|
}
|
||||||
// Write more information to the log file than before
|
// Write more information to the log file than before
|
||||||
log(tr("Building makefile..."));
|
log(tr("Building makefile..."));
|
||||||
|
@ -187,9 +187,9 @@ void ProjectCompiler::writeMakeDefines(QFile &file, bool &genModuleDef)
|
||||||
if (fileType == FileType::CSource || fileType == FileType::CppSource
|
if (fileType == FileType::CSource || fileType == FileType::CppSource
|
||||||
|| fileType==FileType::GAS) {
|
|| fileType==FileType::GAS) {
|
||||||
QString relativeName = extractRelativePath(mProject->directory(), unit->fileName());
|
QString relativeName = extractRelativePath(mProject->directory(), unit->fileName());
|
||||||
if (!mProject->options().objectOutput.isEmpty()) {
|
if (!mProject->options().folderForObjFiles.isEmpty()) {
|
||||||
// ofile = C:\MyProgram\obj\main.o
|
// ofile = C:\MyProgram\obj\main.o
|
||||||
QString fullObjFile = includeTrailingPathDelimiter(mProject->options().objectOutput)
|
QString fullObjFile = includeTrailingPathDelimiter(mProject->options().folderForObjFiles)
|
||||||
+ extractFileName(unit->fileName());
|
+ extractFileName(unit->fileName());
|
||||||
QString relativeObjFile = extractRelativePath(mProject->directory(), changeFileExt(fullObjFile, OBJ_EXT));
|
QString relativeObjFile = extractRelativePath(mProject->directory(), changeFileExt(fullObjFile, OBJ_EXT));
|
||||||
objects << relativeObjFile;
|
objects << relativeObjFile;
|
||||||
|
@ -212,8 +212,8 @@ void ProjectCompiler::writeMakeDefines(QFile &file, bool &genModuleDef)
|
||||||
QString cleanRes;
|
QString cleanRes;
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
if (!mProject->options().privateResource.isEmpty()) {
|
if (!mProject->options().privateResource.isEmpty()) {
|
||||||
if (!mProject->options().objectOutput.isEmpty()) {
|
if (!mProject->options().folderForObjFiles.isEmpty()) {
|
||||||
QString fullResFile = includeTrailingPathDelimiter(mProject->options().objectOutput) +
|
QString fullResFile = includeTrailingPathDelimiter(mProject->options().folderForObjFiles) +
|
||||||
changeFileExt(mProject->options().privateResource, RES_EXT);
|
changeFileExt(mProject->options().privateResource, RES_EXT);
|
||||||
|
|
||||||
QString relativeResFile = extractRelativePath(mProject->directory(), fullResFile);
|
QString relativeResFile = extractRelativePath(mProject->directory(), fullResFile);
|
||||||
|
@ -251,7 +251,7 @@ void ProjectCompiler::writeMakeDefines(QFile &file, bool &genModuleDef)
|
||||||
QStringList resourceArguments = parseArguments(mProject->options().resourceCmd, devCppMacroVariables(), true);
|
QStringList resourceArguments = parseArguments(mProject->options().resourceCmd, devCppMacroVariables(), true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QString executable = extractRelativePath(mProject->makeFileName(), mProject->executable());
|
QString executable = extractRelativePath(mProject->makeFileName(), mProject->outputFilename());
|
||||||
QString cleanExe = localizePath(executable);
|
QString cleanExe = localizePath(executable);
|
||||||
QString pchHeader = extractRelativePath(mProject->makeFileName(), mProject->options().precompiledHeader);
|
QString pchHeader = extractRelativePath(mProject->makeFileName(), mProject->options().precompiledHeader);
|
||||||
QString pch = extractRelativePath(mProject->makeFileName(), mProject->options().precompiledHeader + "." GCH_EXT);
|
QString pch = extractRelativePath(mProject->makeFileName(), mProject->options().precompiledHeader + "." GCH_EXT);
|
||||||
|
@ -301,8 +301,8 @@ void ProjectCompiler::writeMakeDefines(QFile &file, bool &genModuleDef)
|
||||||
|
|
||||||
// This needs to be put in before the clean command.
|
// This needs to be put in before the clean command.
|
||||||
if (mProject->options().type == ProjectType::DynamicLib) {
|
if (mProject->options().type == ProjectType::DynamicLib) {
|
||||||
QString outputFileDir = extractFilePath(mProject->executable());
|
QString outputFileDir = extractFilePath(mProject->outputFilename());
|
||||||
QString outputFilename = extractFileName(mProject->executable());
|
QString outputFilename = extractFileName(mProject->outputFilename());
|
||||||
QString libOutputFile;
|
QString libOutputFile;
|
||||||
if (!outputFilename.startsWith("lib")) {
|
if (!outputFilename.startsWith("lib")) {
|
||||||
libOutputFile = includeTrailingPathDelimiter(outputFileDir) + "lib" + outputFilename;
|
libOutputFile = includeTrailingPathDelimiter(outputFileDir) + "lib" + outputFilename;
|
||||||
|
@ -409,8 +409,8 @@ void ProjectCompiler::writeMakeObjFilesRules(QFile &file)
|
||||||
}
|
}
|
||||||
QString objFileNameTarget;
|
QString objFileNameTarget;
|
||||||
QString objFileNameCommand;
|
QString objFileNameCommand;
|
||||||
if (!mProject->options().objectOutput.isEmpty()) {
|
if (!mProject->options().folderForObjFiles.isEmpty()) {
|
||||||
QString fullObjname = includeTrailingPathDelimiter(mProject->options().objectOutput) +
|
QString fullObjname = includeTrailingPathDelimiter(mProject->options().folderForObjFiles) +
|
||||||
extractFileName(unit->fileName());
|
extractFileName(unit->fileName());
|
||||||
QString objectFile = extractRelativePath(mProject->makeFileName(), changeFileExt(fullObjname, OBJ_EXT));
|
QString objectFile = extractRelativePath(mProject->makeFileName(), changeFileExt(fullObjname, OBJ_EXT));
|
||||||
objFileNameTarget = escapeFilenameForMakefileTarget(objectFile);
|
objFileNameTarget = escapeFilenameForMakefileTarget(objectFile);
|
||||||
|
@ -517,8 +517,8 @@ void ProjectCompiler::writeMakeObjFilesRules(QFile &file)
|
||||||
|
|
||||||
// Determine resource output file
|
// Determine resource output file
|
||||||
QString fullName;
|
QString fullName;
|
||||||
if (!mProject->options().objectOutput.isEmpty()) {
|
if (!mProject->options().folderForObjFiles.isEmpty()) {
|
||||||
fullName = includeTrailingPathDelimiter(mProject->options().objectOutput) +
|
fullName = includeTrailingPathDelimiter(mProject->options().folderForObjFiles) +
|
||||||
changeFileExt(mProject->options().privateResource, RES_EXT);
|
changeFileExt(mProject->options().privateResource, RES_EXT);
|
||||||
} else {
|
} else {
|
||||||
fullName = changeFileExt(mProject->options().privateResource, RES_EXT);
|
fullName = changeFileExt(mProject->options().privateResource, RES_EXT);
|
||||||
|
@ -625,7 +625,7 @@ bool ProjectCompiler::prepareForCompile()
|
||||||
}
|
}
|
||||||
mDirectory = mProject->directory();
|
mDirectory = mProject->directory();
|
||||||
|
|
||||||
mOutputFile = mProject->executable();
|
mOutputFile = mProject->outputFilename();
|
||||||
|
|
||||||
log(tr("Processing makefile:"));
|
log(tr("Processing makefile:"));
|
||||||
log("--------");
|
log("--------");
|
||||||
|
|
|
@ -62,12 +62,12 @@ void SDCCProjectCompiler::createStandardMakeFile()
|
||||||
void SDCCProjectCompiler::newMakeFile(QFile& file)
|
void SDCCProjectCompiler::newMakeFile(QFile& file)
|
||||||
{
|
{
|
||||||
// Create OBJ output directory
|
// Create OBJ output directory
|
||||||
if (!mProject->options().objectOutput.isEmpty()) {
|
if (!mProject->options().folderForObjFiles.isEmpty()) {
|
||||||
QDir(mProject->directory()).mkpath(mProject->options().objectOutput);
|
QDir(mProject->directory()).mkpath(mProject->options().folderForObjFiles);
|
||||||
}
|
}
|
||||||
// Create executable output directory
|
// Create executable output directory
|
||||||
if (!mProject->options().exeOutput.isEmpty()) {
|
if (!mProject->options().folderForOutput.isEmpty()) {
|
||||||
QDir(mProject->directory()).mkpath(mProject->options().exeOutput);
|
QDir(mProject->directory()).mkpath(mProject->options().folderForOutput);
|
||||||
}
|
}
|
||||||
// Write more information to the log file than before
|
// Write more information to the log file than before
|
||||||
log(tr("Building makefile..."));
|
log(tr("Building makefile..."));
|
||||||
|
@ -120,9 +120,9 @@ void SDCCProjectCompiler::writeMakeDefines(QFile &file)
|
||||||
|
|
||||||
if (fileType == FileType::CSource || fileType == FileType::CppSource
|
if (fileType == FileType::CSource || fileType == FileType::CppSource
|
||||||
|| fileType==FileType::GAS) {
|
|| fileType==FileType::GAS) {
|
||||||
if (!mProject->options().objectOutput.isEmpty()) {
|
if (!mProject->options().folderForObjFiles.isEmpty()) {
|
||||||
// ofile = C:\MyProgram\obj\main.o
|
// ofile = C:\MyProgram\obj\main.o
|
||||||
QString fullObjFile = includeTrailingPathDelimiter(mProject->options().objectOutput)
|
QString fullObjFile = includeTrailingPathDelimiter(mProject->options().folderForObjFiles)
|
||||||
+ extractFileName(unit->fileName());
|
+ extractFileName(unit->fileName());
|
||||||
QString relativeObjFile = extractRelativePath(mProject->directory(), changeFileExt(fullObjFile, SDCC_REL_SUFFIX));
|
QString relativeObjFile = extractRelativePath(mProject->directory(), changeFileExt(fullObjFile, SDCC_REL_SUFFIX));
|
||||||
Objects << relativeObjFile;
|
Objects << relativeObjFile;
|
||||||
|
@ -145,9 +145,9 @@ void SDCCProjectCompiler::writeMakeDefines(QFile &file)
|
||||||
QStringList libraryArguments = getLibraryArguments(FileType::Project);
|
QStringList libraryArguments = getLibraryArguments(FileType::Project);
|
||||||
QStringList cIncludeArguments = getCIncludeArguments() + getProjectIncludeArguments();
|
QStringList cIncludeArguments = getCIncludeArguments() + getProjectIncludeArguments();
|
||||||
|
|
||||||
QString executable = extractRelativePath(mProject->makeFileName(), mProject->executable());
|
QString executable = extractRelativePath(mProject->makeFileName(), mProject->outputFilename());
|
||||||
QString cleanExe = localizePath(executable);
|
QString cleanExe = localizePath(executable);
|
||||||
QString ihx = extractRelativePath(mProject->makeFileName(), changeFileExt(mProject->executable(), SDCC_IHX_SUFFIX));
|
QString ihx = extractRelativePath(mProject->makeFileName(), changeFileExt(mProject->outputFilename(), SDCC_IHX_SUFFIX));
|
||||||
QString cleanIhx = localizePath(ihx);
|
QString cleanIhx = localizePath(ihx);
|
||||||
|
|
||||||
writeln(file, "CC = " + escapeArgumentForMakefileVariableValue(cc, true));
|
writeln(file, "CC = " + escapeArgumentForMakefileVariableValue(cc, true));
|
||||||
|
@ -239,8 +239,8 @@ void SDCCProjectCompiler::writeMakeObjFilesRules(QFile &file)
|
||||||
}
|
}
|
||||||
QString objFileNameTarget;
|
QString objFileNameTarget;
|
||||||
QString objFileNameCommand;
|
QString objFileNameCommand;
|
||||||
if (!mProject->options().objectOutput.isEmpty()) {
|
if (!mProject->options().folderForObjFiles.isEmpty()) {
|
||||||
QString fullObjname = includeTrailingPathDelimiter(mProject->options().objectOutput) +
|
QString fullObjname = includeTrailingPathDelimiter(mProject->options().folderForObjFiles) +
|
||||||
extractFileName(unit->fileName());
|
extractFileName(unit->fileName());
|
||||||
QString objFile = extractRelativePath(mProject->makeFileName(), changeFileExt(fullObjname, SDCC_REL_SUFFIX));
|
QString objFile = extractRelativePath(mProject->makeFileName(), changeFileExt(fullObjname, SDCC_REL_SUFFIX));
|
||||||
objFileNameTarget = escapeFilenameForMakefileTarget(objFile);
|
objFileNameTarget = escapeFilenameForMakefileTarget(objFile);
|
||||||
|
@ -341,7 +341,7 @@ bool SDCCProjectCompiler::prepareForCompile()
|
||||||
}
|
}
|
||||||
mDirectory = mProject->directory();
|
mDirectory = mProject->directory();
|
||||||
|
|
||||||
mOutputFile = mProject->executable();
|
mOutputFile = mProject->outputFilename();
|
||||||
log(tr("Processing makefile:"));
|
log(tr("Processing makefile:"));
|
||||||
log("--------");
|
log("--------");
|
||||||
log(tr("- makefile processer: %1").arg(mCompiler));
|
log(tr("- makefile processer: %1").arg(mCompiler));
|
||||||
|
|
|
@ -39,6 +39,8 @@ void CustomFileIconProvider::setRootFolder(const QString &folder)
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_VCS
|
#ifdef ENABLE_VCS
|
||||||
mVCSRepository->setFolder(folder);
|
mVCSRepository->setFolder(folder);
|
||||||
|
#else
|
||||||
|
Q_UNUSED(folder);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2251,7 +2251,7 @@ bool MainWindow::compile(bool rebuild, CppCompileType compileType)
|
||||||
}
|
}
|
||||||
mProject->buildPrivateResource();
|
mProject->buildPrivateResource();
|
||||||
if (mCompileSuccessionTask) {
|
if (mCompileSuccessionTask) {
|
||||||
mCompileSuccessionTask->execName = mProject->executable();
|
mCompileSuccessionTask->execName = mProject->outputFilename();
|
||||||
mCompileSuccessionTask->isExecutable = true;
|
mCompileSuccessionTask->isExecutable = true;
|
||||||
}
|
}
|
||||||
stretchMessagesPanel(true);
|
stretchMessagesPanel(true);
|
||||||
|
@ -2371,14 +2371,14 @@ void MainWindow::runExecutable(RunType runType)
|
||||||
CompileTarget target =getCompileTarget();
|
CompileTarget target =getCompileTarget();
|
||||||
if (target == CompileTarget::Project) {
|
if (target == CompileTarget::Project) {
|
||||||
QStringList binDirs = mProject->binDirs();
|
QStringList binDirs = mProject->binDirs();
|
||||||
QFileInfo execInfo(mProject->executable());
|
QFileInfo execInfo(mProject->outputFilename());
|
||||||
QDateTime execModTime = execInfo.lastModified();
|
QDateTime execModTime = execInfo.lastModified();
|
||||||
if (execInfo.exists() && mProject->modifiedSince(execModTime)) {
|
if (execInfo.exists() && mProject->modifiedSince(execModTime)) {
|
||||||
//if project options changed, or units added/removed
|
//if project options changed, or units added/removed
|
||||||
//mProject->saveAll();
|
//mProject->saveAll();
|
||||||
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
||||||
mCompileSuccessionTask->type = runTypeToCompileSuccessionTaskType(runType);
|
mCompileSuccessionTask->type = runTypeToCompileSuccessionTaskType(runType);
|
||||||
mCompileSuccessionTask->execName=mProject->executable();
|
mCompileSuccessionTask->execName=mProject->outputFilename();
|
||||||
mCompileSuccessionTask->isExecutable=true;
|
mCompileSuccessionTask->isExecutable=true;
|
||||||
mCompileSuccessionTask->binDirs=binDirs;
|
mCompileSuccessionTask->binDirs=binDirs;
|
||||||
compile(true);
|
compile(true);
|
||||||
|
@ -2389,14 +2389,14 @@ void MainWindow::runExecutable(RunType runType)
|
||||||
//mProject->saveAll();
|
//mProject->saveAll();
|
||||||
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
||||||
mCompileSuccessionTask->type = runTypeToCompileSuccessionTaskType(runType);
|
mCompileSuccessionTask->type = runTypeToCompileSuccessionTaskType(runType);
|
||||||
mCompileSuccessionTask->execName=mProject->executable();
|
mCompileSuccessionTask->execName=mProject->outputFilename();
|
||||||
mCompileSuccessionTask->isExecutable=true;
|
mCompileSuccessionTask->isExecutable=true;
|
||||||
mCompileSuccessionTask->binDirs=binDirs;
|
mCompileSuccessionTask->binDirs=binDirs;
|
||||||
compile();
|
compile();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
runExecutable(mProject->executable(),mProject->filename(),runType,
|
runExecutable(mProject->outputFilename(),mProject->filename(),runType,
|
||||||
binDirs);
|
binDirs);
|
||||||
} else {
|
} else {
|
||||||
Editor * editor = mEditorList->getEditor();
|
Editor * editor = mEditorList->getEditor();
|
||||||
|
@ -2486,24 +2486,24 @@ void MainWindow::debug()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Did we compile?
|
// Did we compile?
|
||||||
if (!fileExists(mProject->executable())) {
|
if (!fileExists(mProject->outputFilename())) {
|
||||||
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
||||||
mCompileSuccessionTask->type = CompileSuccessionTaskType::Debug;
|
mCompileSuccessionTask->type = CompileSuccessionTaskType::Debug;
|
||||||
mCompileSuccessionTask->execName = mProject->executable();
|
mCompileSuccessionTask->execName = mProject->outputFilename();
|
||||||
mCompileSuccessionTask->isExecutable = true;
|
mCompileSuccessionTask->isExecutable = true;
|
||||||
mCompileSuccessionTask->binDirs = binDirs;
|
mCompileSuccessionTask->binDirs = binDirs;
|
||||||
compile();
|
compile();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
QFileInfo execInfo(mProject->executable());
|
QFileInfo execInfo(mProject->outputFilename());
|
||||||
QDateTime execModTime = execInfo.lastModified();
|
QDateTime execModTime = execInfo.lastModified();
|
||||||
if (execInfo.exists() && mProject->modifiedSince(execModTime)) {
|
if (execInfo.exists() && mProject->modifiedSince(execModTime)) {
|
||||||
//if project options changed, or units added/removed
|
//if project options changed, or units added/removed
|
||||||
//mProject->saveAll();
|
//mProject->saveAll();
|
||||||
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
||||||
mCompileSuccessionTask->type = CompileSuccessionTaskType::Debug;
|
mCompileSuccessionTask->type = CompileSuccessionTaskType::Debug;
|
||||||
mCompileSuccessionTask->execName=mProject->executable();
|
mCompileSuccessionTask->execName=mProject->outputFilename();
|
||||||
mCompileSuccessionTask->isExecutable=true;
|
mCompileSuccessionTask->isExecutable=true;
|
||||||
mCompileSuccessionTask->binDirs=binDirs;
|
mCompileSuccessionTask->binDirs=binDirs;
|
||||||
compile(true);
|
compile(true);
|
||||||
|
@ -2514,7 +2514,7 @@ void MainWindow::debug()
|
||||||
//mProject->saveAll();
|
//mProject->saveAll();
|
||||||
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>();
|
||||||
mCompileSuccessionTask->type = CompileSuccessionTaskType::Debug;
|
mCompileSuccessionTask->type = CompileSuccessionTaskType::Debug;
|
||||||
mCompileSuccessionTask->execName=mProject->executable();
|
mCompileSuccessionTask->execName=mProject->outputFilename();
|
||||||
mCompileSuccessionTask->isExecutable=true;
|
mCompileSuccessionTask->isExecutable=true;
|
||||||
mCompileSuccessionTask->binDirs=binDirs;
|
mCompileSuccessionTask->binDirs=binDirs;
|
||||||
compile();
|
compile();
|
||||||
|
@ -2542,7 +2542,7 @@ void MainWindow::debug()
|
||||||
}
|
}
|
||||||
// Reset UI, remove invalid breakpoints
|
// Reset UI, remove invalid breakpoints
|
||||||
prepareDebugger();
|
prepareDebugger();
|
||||||
filePath = mProject->executable();
|
filePath = mProject->outputFilename();
|
||||||
|
|
||||||
// mDebugger->setUseUTF8(e->fileEncoding() == ENCODING_UTF8 || e->fileEncoding() == ENCODING_UTF8_BOM);
|
// mDebugger->setUseUTF8(e->fileEncoding() == ENCODING_UTF8 || e->fileEncoding() == ENCODING_UTF8_BOM);
|
||||||
|
|
||||||
|
@ -8245,7 +8245,7 @@ void MainWindow::doCompileRun(RunType runType)
|
||||||
QString execName;
|
QString execName;
|
||||||
if (target == CompileTarget::Project) {
|
if (target == CompileTarget::Project) {
|
||||||
binDirs = mProject->binDirs();
|
binDirs = mProject->binDirs();
|
||||||
execName = mProject->executable();
|
execName = mProject->outputFilename();
|
||||||
} else {
|
} else {
|
||||||
binDirs = getDefaultCompilerSetBinDirs();
|
binDirs = getDefaultCompilerSetBinDirs();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ enum class ParserLanguage {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
inline qHash(const ParserLanguage& value, uint seed) {
|
inline uint qHash(const ParserLanguage& value, uint seed) {
|
||||||
return qHash((int)value, seed);
|
return qHash((int)value, seed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ enum class StatementKind {
|
||||||
Alias, // using alias
|
Alias, // using alias
|
||||||
};
|
};
|
||||||
|
|
||||||
inline qHash(const StatementKind& value, uint seed) {
|
inline uint qHash(const StatementKind& value, uint seed) {
|
||||||
return qHash((int)value, seed);
|
return qHash((int)value, seed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,11 +123,11 @@ QString Project::directory() const
|
||||||
return fileInfo.absolutePath();
|
return fileInfo.absolutePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Project::executable() const
|
QString Project::outputFilename() const
|
||||||
{
|
{
|
||||||
QString exeFileName;
|
QString exeFileName;
|
||||||
if (mOptions.overrideOutput && !mOptions.overridenOutput.isEmpty()) {
|
if (mOptions.useCustomOutputFilename && !mOptions.customOutputFilename.isEmpty()) {
|
||||||
exeFileName = mOptions.overridenOutput;
|
exeFileName = mOptions.customOutputFilename;
|
||||||
} else {
|
} else {
|
||||||
switch(mOptions.type) {
|
switch(mOptions.type) {
|
||||||
#ifdef ENABLE_SDCC
|
#ifdef ENABLE_SDCC
|
||||||
|
@ -155,9 +155,9 @@ QString Project::executable() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QString exePath;
|
QString exePath;
|
||||||
if (!mOptions.exeOutput.isEmpty()) {
|
if (!mOptions.folderForOutput.isEmpty()) {
|
||||||
QDir baseDir(directory());
|
QDir baseDir(directory());
|
||||||
exePath = baseDir.filePath(mOptions.exeOutput);
|
exePath = baseDir.filePath(mOptions.folderForOutput);
|
||||||
} else {
|
} else {
|
||||||
exePath = directory();
|
exePath = directory();
|
||||||
}
|
}
|
||||||
|
@ -1090,12 +1090,12 @@ bool Project::saveAsTemplate(const QString &templateFolder,
|
||||||
ini->SetBoolValue("Project", "IncludeVersionInfo", true);
|
ini->SetBoolValue("Project", "IncludeVersionInfo", true);
|
||||||
if (mOptions.supportXPThemes)
|
if (mOptions.supportXPThemes)
|
||||||
ini->SetBoolValue("Project", "SupportXPThemes", true);
|
ini->SetBoolValue("Project", "SupportXPThemes", true);
|
||||||
if (!mOptions.exeOutput.isEmpty())
|
if (!mOptions.folderForOutput.isEmpty())
|
||||||
ini->SetValue("Project", "ExeOutput", extractRelativePath(directory(),mOptions.exeOutput).toUtf8());
|
ini->SetValue("Project", "ExeOutput", extractRelativePath(directory(),mOptions.folderForOutput).toUtf8());
|
||||||
if (!mOptions.objectOutput.isEmpty())
|
if (!mOptions.folderForObjFiles.isEmpty())
|
||||||
ini->SetValue("Project", "ObjectOutput", extractRelativePath(directory(),mOptions.objectOutput).toUtf8());
|
ini->SetValue("Project", "ObjectOutput", extractRelativePath(directory(),mOptions.folderForObjFiles).toUtf8());
|
||||||
if (!mOptions.logOutput.isEmpty())
|
if (!mOptions.logFilename.isEmpty())
|
||||||
ini->SetValue("Project", "LogOutput", extractRelativePath(directory(),mOptions.logOutput).toUtf8());
|
ini->SetValue("Project", "LogOutput", extractRelativePath(directory(),mOptions.logFilename).toUtf8());
|
||||||
if (mOptions.execEncoding!=ENCODING_SYSTEM_DEFAULT)
|
if (mOptions.execEncoding!=ENCODING_SYSTEM_DEFAULT)
|
||||||
ini->SetValue("Project","ExecEncoding", mOptions.execEncoding);
|
ini->SetValue("Project","ExecEncoding", mOptions.execEncoding);
|
||||||
|
|
||||||
|
@ -1190,12 +1190,12 @@ void Project::saveOptions()
|
||||||
ini.SetValue("Project", "ResourceCommand", toByteArray(textToLines(mOptions.resourceCmd).join(" ")));
|
ini.SetValue("Project", "ResourceCommand", toByteArray(textToLines(mOptions.resourceCmd).join(" ")));
|
||||||
ini.SetLongValue("Project","IsCpp", mOptions.isCpp);
|
ini.SetLongValue("Project","IsCpp", mOptions.isCpp);
|
||||||
ini.SetValue("Project","Icon", toByteArray(extractRelativePath(directory(), mOptions.icon)));
|
ini.SetValue("Project","Icon", toByteArray(extractRelativePath(directory(), mOptions.icon)));
|
||||||
ini.SetValue("Project","ExeOutput", toByteArray(extractRelativePath(directory(),mOptions.exeOutput)));
|
ini.SetValue("Project","ExeOutput", toByteArray(extractRelativePath(directory(),mOptions.folderForOutput)));
|
||||||
ini.SetValue("Project","ObjectOutput", toByteArray(extractRelativePath(directory(),mOptions.objectOutput)));
|
ini.SetValue("Project","ObjectOutput", toByteArray(extractRelativePath(directory(),mOptions.folderForObjFiles)));
|
||||||
ini.SetValue("Project","LogOutput", toByteArray(extractRelativePath(directory(),mOptions.logOutput)));
|
ini.SetValue("Project","LogOutput", toByteArray(extractRelativePath(directory(),mOptions.logFilename)));
|
||||||
ini.SetLongValue("Project","LogOutputEnabled", mOptions.logOutputEnabled);
|
ini.SetLongValue("Project","LogOutputEnabled", mOptions.logOutput);
|
||||||
ini.SetLongValue("Project","OverrideOutput", mOptions.overrideOutput);
|
ini.SetLongValue("Project","OverrideOutput", mOptions.useCustomOutputFilename);
|
||||||
ini.SetValue("Project","OverrideOutputName", toByteArray(mOptions.overridenOutput));
|
ini.SetValue("Project","OverrideOutputName", toByteArray(mOptions.customOutputFilename));
|
||||||
ini.SetValue("Project","HostApplication", toByteArray(extractRelativePath(directory(), mOptions.hostApplication)));
|
ini.SetValue("Project","HostApplication", toByteArray(extractRelativePath(directory(), mOptions.hostApplication)));
|
||||||
ini.SetLongValue("Project","UseCustomMakefile", mOptions.useCustomMakefile);
|
ini.SetLongValue("Project","UseCustomMakefile", mOptions.useCustomMakefile);
|
||||||
ini.SetValue("Project","CustomMakefile", toByteArray(extractRelativePath(directory(),mOptions.customMakefile)));
|
ini.SetValue("Project","CustomMakefile", toByteArray(extractRelativePath(directory(),mOptions.customMakefile)));
|
||||||
|
@ -1444,12 +1444,12 @@ void Project::buildPrivateResource()
|
||||||
contents.append("// THIS WILL MAKE THE PROGRAM USE THE COMMON CONTROLS");
|
contents.append("// THIS WILL MAKE THE PROGRAM USE THE COMMON CONTROLS");
|
||||||
contents.append("// LIBRARY VERSION 6.0 (IF IT IS AVAILABLE)");
|
contents.append("// LIBRARY VERSION 6.0 (IF IT IS AVAILABLE)");
|
||||||
contents.append("//");
|
contents.append("//");
|
||||||
if (!mOptions.exeOutput.isEmpty())
|
if (!mOptions.folderForOutput.isEmpty())
|
||||||
contents.append(
|
contents.append(
|
||||||
"1 24 \"" + includeTrailingPathDelimiter(mOptions.exeOutput)
|
"1 24 \"" + includeTrailingPathDelimiter(mOptions.folderForOutput)
|
||||||
+ extractFileName(executable()) + ".Manifest\"");
|
+ extractFileName(outputFilename()) + ".Manifest\"");
|
||||||
else
|
else
|
||||||
contents.append("1 24 \"" + extractFileName(executable()) + ".Manifest\"");
|
contents.append("1 24 \"" + extractFileName(outputFilename()) + ".Manifest\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mOptions.includeVersionInfo) {
|
if (mOptions.includeVersionInfo) {
|
||||||
|
@ -1573,7 +1573,7 @@ void Project::buildPrivateResource()
|
||||||
content.append(" </dependentAssembly>");
|
content.append(" </dependentAssembly>");
|
||||||
content.append("</dependency>");
|
content.append("</dependency>");
|
||||||
content.append("</assembly>");
|
content.append("</assembly>");
|
||||||
stringsToFile(content,executable() + ".Manifest");
|
stringsToFile(content,outputFilename() + ".Manifest");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create private header file
|
// create private header file
|
||||||
|
@ -2024,12 +2024,12 @@ void Project::loadOptions(SimpleIni& ini)
|
||||||
#endif
|
#endif
|
||||||
));
|
));
|
||||||
mOptions.isCpp = ini.GetBoolValue("Project", "IsCpp", false);
|
mOptions.isCpp = ini.GetBoolValue("Project", "IsCpp", false);
|
||||||
mOptions.exeOutput = generateAbsolutePath(directory(), fromByteArray(ini.GetValue("Project", "ExeOutput", "")));
|
mOptions.folderForOutput = generateAbsolutePath(directory(), fromByteArray(ini.GetValue("Project", "ExeOutput", "")));
|
||||||
mOptions.objectOutput = generateAbsolutePath(directory(), fromByteArray(ini.GetValue("Project", "ObjectOutput", "")));
|
mOptions.folderForObjFiles = generateAbsolutePath(directory(), fromByteArray(ini.GetValue("Project", "ObjectOutput", "")));
|
||||||
mOptions.logOutput = generateAbsolutePath(directory(), fromByteArray(ini.GetValue("Project", "LogOutput", "")));
|
mOptions.logFilename = generateAbsolutePath(directory(), fromByteArray(ini.GetValue("Project", "LogOutput", "")));
|
||||||
mOptions.logOutputEnabled = ini.GetBoolValue("Project", "LogOutputEnabled", false);
|
mOptions.logOutput = ini.GetBoolValue("Project", "LogOutputEnabled", false);
|
||||||
mOptions.overrideOutput = ini.GetBoolValue("Project", "OverrideOutput", false);
|
mOptions.useCustomOutputFilename = ini.GetBoolValue("Project", "OverrideOutput", false);
|
||||||
mOptions.overridenOutput = fromByteArray(ini.GetValue("Project", "OverrideOutputName", ""));
|
mOptions.customOutputFilename = fromByteArray(ini.GetValue("Project", "OverrideOutputName", ""));
|
||||||
mOptions.hostApplication = generateAbsolutePath(directory(), fromByteArray(ini.GetValue("Project", "HostApplication", "")));
|
mOptions.hostApplication = generateAbsolutePath(directory(), fromByteArray(ini.GetValue("Project", "HostApplication", "")));
|
||||||
mOptions.useCustomMakefile = ini.GetBoolValue("Project", "UseCustomMakefile", false);
|
mOptions.useCustomMakefile = ini.GetBoolValue("Project", "UseCustomMakefile", false);
|
||||||
mOptions.customMakefile = generateAbsolutePath(directory(),fromByteArray(ini.GetValue("Project", "CustomMakefile", "")));
|
mOptions.customMakefile = generateAbsolutePath(directory(),fromByteArray(ini.GetValue("Project", "CustomMakefile", "")));
|
||||||
|
@ -2155,7 +2155,7 @@ void Project::loadOptions(SimpleIni& ini)
|
||||||
mOptions.versionInfo.legalCopyright = fromByteArray(ini.GetValue("VersionInfo", "LegalCopyright", ""));
|
mOptions.versionInfo.legalCopyright = fromByteArray(ini.GetValue("VersionInfo", "LegalCopyright", ""));
|
||||||
mOptions.versionInfo.legalTrademarks = fromByteArray(ini.GetValue("VersionInfo", "LegalTrademarks", ""));
|
mOptions.versionInfo.legalTrademarks = fromByteArray(ini.GetValue("VersionInfo", "LegalTrademarks", ""));
|
||||||
mOptions.versionInfo.originalFilename = fromByteArray(ini.GetValue("VersionInfo", "OriginalFilename",
|
mOptions.versionInfo.originalFilename = fromByteArray(ini.GetValue("VersionInfo", "OriginalFilename",
|
||||||
toByteArray(extractFileName(executable()))));
|
toByteArray(extractFileName(outputFilename()))));
|
||||||
mOptions.versionInfo.productName = fromByteArray(ini.GetValue("VersionInfo", "ProductName", toByteArray(mName)));
|
mOptions.versionInfo.productName = fromByteArray(ini.GetValue("VersionInfo", "ProductName", toByteArray(mName)));
|
||||||
mOptions.versionInfo.productVersion = fromByteArray(ini.GetValue("VersionInfo", "ProductVersion", "0.1.1.1"));
|
mOptions.versionInfo.productVersion = fromByteArray(ini.GetValue("VersionInfo", "ProductVersion", "0.1.1.1"));
|
||||||
mOptions.versionInfo.autoIncBuildNr = ini.GetBoolValue("VersionInfo", "AutoIncBuildNr", false);
|
mOptions.versionInfo.autoIncBuildNr = ini.GetBoolValue("VersionInfo", "AutoIncBuildNr", false);
|
||||||
|
|
|
@ -212,7 +212,7 @@ public:
|
||||||
|
|
||||||
~Project();
|
~Project();
|
||||||
QString directory() const;
|
QString directory() const;
|
||||||
QString executable() const;
|
QString outputFilename() const;
|
||||||
QString makeFileName();
|
QString makeFileName();
|
||||||
QString xmakeFileName();
|
QString xmakeFileName();
|
||||||
bool unitsModifiedSince(const QDateTime& time);
|
bool unitsModifiedSince(const QDateTime& time);
|
||||||
|
|
|
@ -43,10 +43,10 @@ ProjectOptions::ProjectOptions()
|
||||||
type = ProjectType::GUI;
|
type = ProjectType::GUI;
|
||||||
version = 3;
|
version = 3;
|
||||||
isCpp = false;
|
isCpp = false;
|
||||||
logOutputEnabled = false;
|
logOutput = false;
|
||||||
useCustomMakefile = false;
|
useCustomMakefile = false;
|
||||||
usePrecompiledHeader = false;
|
usePrecompiledHeader = false;
|
||||||
overrideOutput = false;
|
useCustomOutputFilename = false;
|
||||||
includeVersionInfo = false;
|
includeVersionInfo = false;
|
||||||
supportXPThemes = false;
|
supportXPThemes = false;
|
||||||
compilerSet = 0;
|
compilerSet = 0;
|
||||||
|
|
|
@ -76,16 +76,16 @@ struct ProjectOptions{
|
||||||
QStringList makeIncludes;
|
QStringList makeIncludes;
|
||||||
bool isCpp;
|
bool isCpp;
|
||||||
QString icon;
|
QString icon;
|
||||||
QString exeOutput;
|
QString folderForOutput;
|
||||||
QString objectOutput;
|
QString folderForObjFiles;
|
||||||
QString logOutput;
|
QString logFilename;
|
||||||
bool logOutputEnabled;
|
bool logOutput;
|
||||||
bool useCustomMakefile;
|
bool useCustomMakefile;
|
||||||
QString customMakefile;
|
QString customMakefile;
|
||||||
bool usePrecompiledHeader;
|
bool usePrecompiledHeader;
|
||||||
QString precompiledHeader;
|
QString precompiledHeader;
|
||||||
bool overrideOutput;
|
bool useCustomOutputFilename;
|
||||||
QString overridenOutput;
|
QString customOutputFilename;
|
||||||
QString hostApplication;
|
QString hostApplication;
|
||||||
bool includeVersionInfo;
|
bool includeVersionInfo;
|
||||||
bool supportXPThemes;
|
bool supportXPThemes;
|
||||||
|
|
|
@ -152,9 +152,9 @@ void ProjectTemplate::readTemplateFile(const QString &fileName)
|
||||||
mOptions.isCpp = mIni->GetBoolValue("Project", "IsCpp", false);
|
mOptions.isCpp = mIni->GetBoolValue("Project", "IsCpp", false);
|
||||||
mOptions.includeVersionInfo = mIni->GetBoolValue("Project", "IncludeVersionInfo", false);
|
mOptions.includeVersionInfo = mIni->GetBoolValue("Project", "IncludeVersionInfo", false);
|
||||||
mOptions.supportXPThemes = mIni->GetBoolValue("Project", "SupportXPThemes", false);
|
mOptions.supportXPThemes = mIni->GetBoolValue("Project", "SupportXPThemes", false);
|
||||||
mOptions.exeOutput = fromByteArray(mIni->GetValue("Project", "ExeOutput", ""));
|
mOptions.folderForOutput = fromByteArray(mIni->GetValue("Project", "ExeOutput", ""));
|
||||||
mOptions.objectOutput = fromByteArray(mIni->GetValue("Project", "ObjectOutput", ""));
|
mOptions.folderForObjFiles = fromByteArray(mIni->GetValue("Project", "ObjectOutput", ""));
|
||||||
mOptions.logOutput = fromByteArray(mIni->GetValue("Project", "LogOutput", ""));
|
mOptions.logFilename = fromByteArray(mIni->GetValue("Project", "LogOutput", ""));
|
||||||
mOptions.execEncoding = mIni->GetValue("Project","ExecEncoding", ENCODING_SYSTEM_DEFAULT);
|
mOptions.execEncoding = mIni->GetValue("Project","ExecEncoding", ENCODING_SYSTEM_DEFAULT);
|
||||||
|
|
||||||
mOptions.staticLink = mIni->GetBoolValue("Project", "StaticLink",true);
|
mOptions.staticLink = mIni->GetBoolValue("Project", "StaticLink",true);
|
||||||
|
|
|
@ -1446,8 +1446,8 @@ void Settings::Editor::doLoad()
|
||||||
mEnhanceHomeKey = boolValue("enhance_home_key", true);
|
mEnhanceHomeKey = boolValue("enhance_home_key", true);
|
||||||
mEnhanceEndKey = boolValue("enhance_end_key",true);
|
mEnhanceEndKey = boolValue("enhance_end_key",true);
|
||||||
mKeepCaretX = boolValue("keep_caret_x",true);
|
mKeepCaretX = boolValue("keep_caret_x",true);
|
||||||
mCaretForInsert = static_cast<QSynedit::EditCaretType>( intValue("caret_for_insert",static_cast<int>(QSynedit::EditCaretType::ctVerticalLine)));
|
mCaretForInsert = static_cast<QSynedit::EditCaretType>( intValue("caret_for_insert",static_cast<int>(QSynedit::EditCaretType::VerticalLine)));
|
||||||
mCaretForOverwrite = static_cast<QSynedit::EditCaretType>( intValue("caret_for_overwrite",static_cast<int>(QSynedit::EditCaretType::ctBlock)));
|
mCaretForOverwrite = static_cast<QSynedit::EditCaretType>( intValue("caret_for_overwrite",static_cast<int>(QSynedit::EditCaretType::Block)));
|
||||||
mCaretUseTextColor = boolValue("caret_use_text_color",true);
|
mCaretUseTextColor = boolValue("caret_use_text_color",true);
|
||||||
mCaretColor = colorValue("caret_color",Qt::yellow);
|
mCaretColor = colorValue("caret_color",Qt::yellow);
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ static void setCaretTypeIndex(QComboBox* combo, QSynedit::EditCaretType caretTyp
|
||||||
|
|
||||||
static QSynedit::EditCaretType getCaretTypeIndex(QComboBox* combo) {
|
static QSynedit::EditCaretType getCaretTypeIndex(QComboBox* combo) {
|
||||||
if (combo->currentIndex()<0)
|
if (combo->currentIndex()<0)
|
||||||
return QSynedit::EditCaretType::ctVerticalLine;
|
return QSynedit::EditCaretType::VerticalLine;
|
||||||
return static_cast<QSynedit::EditCaretType>(combo->currentIndex());
|
return static_cast<QSynedit::EditCaretType>(combo->currentIndex());
|
||||||
}
|
}
|
||||||
void EditorGeneralWidget::doLoad()
|
void EditorGeneralWidget::doLoad()
|
||||||
|
|
|
@ -74,7 +74,7 @@ void ProjectGeneralWidget::doLoad()
|
||||||
|
|
||||||
ui->txtName->setText(project->name());
|
ui->txtName->setText(project->name());
|
||||||
ui->txtFileName->setText(project->filename());
|
ui->txtFileName->setText(project->filename());
|
||||||
ui->txtOutputFile->setText(project->executable());
|
ui->txtOutputFile->setText(project->outputFilename());
|
||||||
|
|
||||||
int srcCount=0,headerCount=0,resCount=0,otherCount=0, totalCount=0;
|
int srcCount=0,headerCount=0,resCount=0,otherCount=0, totalCount=0;
|
||||||
foreach (const PProjectUnit& unit, project->unitList()) {
|
foreach (const PProjectUnit& unit, project->unitList()) {
|
||||||
|
@ -251,6 +251,6 @@ void ProjectGeneralWidget::on_cbType_currentIndexChanged(int /*index*/)
|
||||||
std::shared_ptr<Project> project = pMainWindow->project();
|
std::shared_ptr<Project> project = pMainWindow->project();
|
||||||
if (!project)
|
if (!project)
|
||||||
return;
|
return;
|
||||||
ui->txtOutputFile->setText(project->executable());
|
ui->txtOutputFile->setText(project->outputFilename());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,22 +38,22 @@ ProjectOutputWidget::~ProjectOutputWidget()
|
||||||
|
|
||||||
void ProjectOutputWidget::doLoad()
|
void ProjectOutputWidget::doLoad()
|
||||||
{
|
{
|
||||||
ui->txtOutputDir->setText(pMainWindow->project()->options().exeOutput);
|
ui->txtOutputDir->setText(pMainWindow->project()->options().folderForOutput);
|
||||||
ui->txtObjOutputDir->setText(pMainWindow->project()->options().objectOutput);
|
ui->txtObjOutputDir->setText(pMainWindow->project()->options().folderForObjFiles);
|
||||||
ui->grpAutosaveCompileLog->setChecked(pMainWindow->project()->options().logOutputEnabled);
|
ui->grpAutosaveCompileLog->setChecked(pMainWindow->project()->options().logOutput);
|
||||||
ui->txtCompileLog->setText(pMainWindow->project()->options().logOutput);
|
ui->txtCompileLog->setText(pMainWindow->project()->options().logFilename);
|
||||||
ui->grpOverrideOutput->setChecked(pMainWindow->project()->options().overrideOutput);
|
ui->grpOverrideOutput->setChecked(pMainWindow->project()->options().useCustomOutputFilename);
|
||||||
ui->txtOutputFilename->setText(pMainWindow->project()->options().overridenOutput);
|
ui->txtOutputFilename->setText(pMainWindow->project()->options().customOutputFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectOutputWidget::doSave()
|
void ProjectOutputWidget::doSave()
|
||||||
{
|
{
|
||||||
pMainWindow->project()->options().exeOutput = ui->txtOutputDir->text();
|
pMainWindow->project()->options().folderForOutput = ui->txtOutputDir->text();
|
||||||
pMainWindow->project()->options().objectOutput = ui->txtObjOutputDir->text();
|
pMainWindow->project()->options().folderForObjFiles = ui->txtObjOutputDir->text();
|
||||||
pMainWindow->project()->options().logOutputEnabled = ui->grpAutosaveCompileLog->isChecked();
|
pMainWindow->project()->options().logOutput = ui->grpAutosaveCompileLog->isChecked();
|
||||||
pMainWindow->project()->options().logOutput = ui->txtCompileLog->text();
|
pMainWindow->project()->options().logFilename = ui->txtCompileLog->text();
|
||||||
pMainWindow->project()->options().overrideOutput = ui->grpOverrideOutput->isChecked();
|
pMainWindow->project()->options().useCustomOutputFilename = ui->grpOverrideOutput->isChecked();
|
||||||
pMainWindow->project()->options().overridenOutput = ui->txtOutputFilename->text();
|
pMainWindow->project()->options().customOutputFilename = ui->txtOutputFilename->text();
|
||||||
pMainWindow->project()->saveOptions();
|
pMainWindow->project()->saveOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Executable output directory</string>
|
<string>Directory for output</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Object file output directory</string>
|
<string>Directory for obj files</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
|
|
|
@ -203,6 +203,7 @@ void SettingsWidget::clearSettingsChanged()
|
||||||
|
|
||||||
void SettingsWidget::showEvent(QShowEvent *event)
|
void SettingsWidget::showEvent(QShowEvent *event)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(event);
|
||||||
load();
|
load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1460,12 +1460,12 @@
|
||||||
<translation>Inserir a condição de parada:</translation>
|
<translation>Inserir a condição de parada:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+260"/>
|
<location line="+262"/>
|
||||||
<source>Readonly</source>
|
<source>Readonly</source>
|
||||||
<translation>Apenas leitura</translation>
|
<translation>Apenas leitura</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-5452"/>
|
<location line="-5454"/>
|
||||||
<location line="+505"/>
|
<location line="+505"/>
|
||||||
<source>Error Load File</source>
|
<source>Error Load File</source>
|
||||||
<translation type="unfinished">Erro ao carregar arquivo</translation>
|
<translation type="unfinished">Erro ao carregar arquivo</translation>
|
||||||
|
@ -4276,7 +4276,7 @@
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.ui" line="+14"/>
|
<location filename="../mainwindow.ui" line="+14"/>
|
||||||
<location filename="../mainwindow.cpp" line="+1324"/>
|
<location filename="../mainwindow.cpp" line="+1330"/>
|
||||||
<source>Red Panda C++</source>
|
<source>Red Panda C++</source>
|
||||||
<translation>Red Panda C++</translation>
|
<translation>Red Panda C++</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -5483,13 +5483,13 @@
|
||||||
<translation>Ctrl+Shift+Down</translation>
|
<translation>Ctrl+Shift+Down</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="-8406"/>
|
<location filename="../mainwindow.cpp" line="-8412"/>
|
||||||
<location line="+72"/>
|
<location line="+72"/>
|
||||||
<location line="+9"/>
|
<location line="+9"/>
|
||||||
<location line="+8"/>
|
<location line="+8"/>
|
||||||
<location line="+9"/>
|
<location line="+9"/>
|
||||||
<location line="+61"/>
|
<location line="+61"/>
|
||||||
<location line="+1359"/>
|
<location line="+1365"/>
|
||||||
<location line="+1799"/>
|
<location line="+1799"/>
|
||||||
<location line="+117"/>
|
<location line="+117"/>
|
||||||
<location line="+1866"/>
|
<location line="+1866"/>
|
||||||
|
@ -5501,7 +5501,7 @@
|
||||||
<translation>Erro</translation>
|
<translation>Erro</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-9506"/>
|
<location line="-9512"/>
|
||||||
<source>New</source>
|
<source>New</source>
|
||||||
<translation>Novo</translation>
|
<translation>Novo</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -5527,18 +5527,18 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+85"/>
|
<location line="+85"/>
|
||||||
<location line="+8310"/>
|
<location line="+8316"/>
|
||||||
<source>Problem Set %1</source>
|
<source>Problem Set %1</source>
|
||||||
<translation>Conjunto de problemas %1</translation>
|
<translation>Conjunto de problemas %1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-7663"/>
|
<location line="-7669"/>
|
||||||
<location line="+6"/>
|
<location line="+6"/>
|
||||||
<source>Load Theme Error</source>
|
<source>Load Theme Error</source>
|
||||||
<translation>Erro ao carregar tema</translation>
|
<translation>Erro ao carregar tema</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+325"/>
|
<location line="+331"/>
|
||||||
<location line="+2"/>
|
<location line="+2"/>
|
||||||
<location line="+30"/>
|
<location line="+30"/>
|
||||||
<location line="+2"/>
|
<location line="+2"/>
|
||||||
|
@ -7018,7 +7018,7 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="-5173"/>
|
<location filename="../mainwindow.cpp" line="-5179"/>
|
||||||
<source>Exact</source>
|
<source>Exact</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -7033,7 +7033,7 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+7043"/>
|
<location line="+7049"/>
|
||||||
<source>Folder Not Empty</source>
|
<source>Folder Not Empty</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -8137,22 +8137,30 @@
|
||||||
<translation>Configuração</translation>
|
<translation>Configuração</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+6"/>
|
|
||||||
<location filename="../settingsdialog/projectoutputwidget.cpp" line="+67"/>
|
<location filename="../settingsdialog/projectoutputwidget.cpp" line="+67"/>
|
||||||
<source>Executable output directory</source>
|
<source>Executable output directory</source>
|
||||||
<translation>Pasta do executável</translation>
|
<translation>Pasta do executável</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+9"/>
|
<location filename="../settingsdialog/projectoutputwidget.ui" line="+15"/>
|
||||||
<location line="+19"/>
|
<location line="+19"/>
|
||||||
<location line="+25"/>
|
<location line="+25"/>
|
||||||
<source>browse</source>
|
<source>browse</source>
|
||||||
<translation>navegar</translation>
|
<translation>navegar</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-34"/>
|
|
||||||
<source>Object file output directory</source>
|
<source>Object file output directory</source>
|
||||||
<translation>Pasta do arquivo objeto</translation>
|
<translation type="vanished">Pasta do arquivo objeto</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="-53"/>
|
||||||
|
<source>Directory for output</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="+19"/>
|
||||||
|
<source>Directory for obj files</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+19"/>
|
<location line="+19"/>
|
||||||
|
@ -8381,7 +8389,7 @@
|
||||||
<context>
|
<context>
|
||||||
<name>QFileSystemModel</name>
|
<name>QFileSystemModel</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="-1214"/>
|
<location filename="../mainwindow.cpp" line="-1220"/>
|
||||||
<source><b>The name "%1" cannot be used.</b><p>Try using another name, with fewer characters or no punctuation marks.</source>
|
<source><b>The name "%1" cannot be used.</b><p>Try using another name, with fewer characters or no punctuation marks.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -8681,7 +8689,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../editorlist.cpp" line="+178"/>
|
<location filename="../editorlist.cpp" line="+178"/>
|
||||||
<location filename="../mainwindow.cpp" line="+3227"/>
|
<location filename="../mainwindow.cpp" line="+3233"/>
|
||||||
<source>Save</source>
|
<source>Save</source>
|
||||||
<translation>Salvar</translation>
|
<translation>Salvar</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -9000,7 +9008,7 @@
|
||||||
<translation type="vanished">Índice %1 fora dos limites</translation>
|
<translation type="vanished">Índice %1 fora dos limites</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../utils.cpp" line="+488"/>
|
<location filename="../utils.cpp" line="+486"/>
|
||||||
<source>bytes</source>
|
<source>bytes</source>
|
||||||
<translation>bytes</translation>
|
<translation>bytes</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -10878,7 +10886,7 @@
|
||||||
<translation>Remover compilado</translation>
|
<translation>Remover compilado</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+28"/>
|
<location line="+32"/>
|
||||||
<location line="+13"/>
|
<location line="+13"/>
|
||||||
<source>Read tools config failed</source>
|
<source>Read tools config failed</source>
|
||||||
<translation>Falha ao ler configurações de ferramentas</translation>
|
<translation>Falha ao ler configurações de ferramentas</translation>
|
||||||
|
|
|
@ -1722,7 +1722,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation>输入当前断点的生效条件:</translation>
|
<translation>输入当前断点的生效条件:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+260"/>
|
<location line="+262"/>
|
||||||
<source>Readonly</source>
|
<source>Readonly</source>
|
||||||
<translation>只读</translation>
|
<translation>只读</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4629,7 +4629,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.ui" line="+14"/>
|
<location filename="../mainwindow.ui" line="+14"/>
|
||||||
<location filename="../mainwindow.cpp" line="+1324"/>
|
<location filename="../mainwindow.cpp" line="+1330"/>
|
||||||
<source>Red Panda C++</source>
|
<source>Red Panda C++</source>
|
||||||
<translation>小熊猫C++</translation>
|
<translation>小熊猫C++</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4790,7 +4790,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation type="vanished">工具栏2</translation>
|
<translation type="vanished">工具栏2</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="-1707"/>
|
<location filename="../mainwindow.cpp" line="-1713"/>
|
||||||
<source>New</source>
|
<source>New</source>
|
||||||
<translation>新建</translation>
|
<translation>新建</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4923,7 +4923,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+5"/>
|
<location line="+5"/>
|
||||||
<location filename="../mainwindow.cpp" line="+2707"/>
|
<location filename="../mainwindow.cpp" line="+2713"/>
|
||||||
<location line="+27"/>
|
<location line="+27"/>
|
||||||
<location line="+200"/>
|
<location line="+200"/>
|
||||||
<source>Copy</source>
|
<source>Copy</source>
|
||||||
|
@ -6202,12 +6202,12 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation>文件编码</translation>
|
<translation>文件编码</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-3408"/>
|
<location line="-3414"/>
|
||||||
<source>Recent Files</source>
|
<source>Recent Files</source>
|
||||||
<translation>文件历史</translation>
|
<translation>文件历史</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+1069"/>
|
<location line="+1075"/>
|
||||||
<location line="+2"/>
|
<location line="+2"/>
|
||||||
<location line="+30"/>
|
<location line="+30"/>
|
||||||
<location line="+2"/>
|
<location line="+2"/>
|
||||||
|
@ -6529,7 +6529,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation>清除</translation>
|
<translation>清除</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="-2915"/>
|
<location filename="../mainwindow.cpp" line="-2921"/>
|
||||||
<source>Export</source>
|
<source>Export</source>
|
||||||
<translation>导出</translation>
|
<translation>导出</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -6540,7 +6540,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+85"/>
|
<location line="+85"/>
|
||||||
<location line="+8310"/>
|
<location line="+8316"/>
|
||||||
<source>Problem Set %1</source>
|
<source>Problem Set %1</source>
|
||||||
<translation>试题集%1</translation>
|
<translation>试题集%1</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -7496,13 +7496,13 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation>试题案例%1</translation>
|
<translation>试题案例%1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-8554"/>
|
<location line="-8560"/>
|
||||||
<location line="+72"/>
|
<location line="+72"/>
|
||||||
<location line="+9"/>
|
<location line="+9"/>
|
||||||
<location line="+8"/>
|
<location line="+8"/>
|
||||||
<location line="+9"/>
|
<location line="+9"/>
|
||||||
<location line="+61"/>
|
<location line="+61"/>
|
||||||
<location line="+1359"/>
|
<location line="+1365"/>
|
||||||
<location line="+1799"/>
|
<location line="+1799"/>
|
||||||
<location line="+117"/>
|
<location line="+117"/>
|
||||||
<location line="+1866"/>
|
<location line="+1866"/>
|
||||||
|
@ -7514,7 +7514,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation>错误</translation>
|
<translation>错误</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-9484"/>
|
<location line="-9490"/>
|
||||||
<source>Recent Projects</source>
|
<source>Recent Projects</source>
|
||||||
<translation>项目历史</translation>
|
<translation>项目历史</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -7525,7 +7525,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation>载入主题失败</translation>
|
<translation>载入主题失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+453"/>
|
<location line="+459"/>
|
||||||
<location line="+22"/>
|
<location line="+22"/>
|
||||||
<source>Clear History</source>
|
<source>Clear History</source>
|
||||||
<translation>清除历史</translation>
|
<translation>清除历史</translation>
|
||||||
|
@ -7589,7 +7589,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation>确认转换</translation>
|
<translation>确认转换</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-9585"/>
|
<location line="-9591"/>
|
||||||
<source>Exact</source>
|
<source>Exact</source>
|
||||||
<translation>完全一致</translation>
|
<translation>完全一致</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -7608,7 +7608,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation type="vanished">行: %1 列: %2 (%3个字符) 总行数: %4</translation>
|
<translation type="vanished">行: %1 列: %2 (%3个字符) 总行数: %4</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+2312"/>
|
<location line="+2318"/>
|
||||||
<location line="+123"/>
|
<location line="+123"/>
|
||||||
<location line="+2724"/>
|
<location line="+2724"/>
|
||||||
<source>If you are using the Release compiler set, please use choose the Debug version from toolbar.</source>
|
<source>If you are using the Release compiler set, please use choose the Debug version from toolbar.</source>
|
||||||
|
@ -8800,22 +8800,30 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation>表单</translation>
|
<translation>表单</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+6"/>
|
|
||||||
<location filename="../settingsdialog/projectoutputwidget.cpp" line="+67"/>
|
<location filename="../settingsdialog/projectoutputwidget.cpp" line="+67"/>
|
||||||
<source>Executable output directory</source>
|
<source>Executable output directory</source>
|
||||||
<translation>可执行文件输出文件夹</translation>
|
<translation>可执行文件输出文件夹</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+9"/>
|
<location filename="../settingsdialog/projectoutputwidget.ui" line="+15"/>
|
||||||
<location line="+19"/>
|
<location line="+19"/>
|
||||||
<location line="+25"/>
|
<location line="+25"/>
|
||||||
<source>browse</source>
|
<source>browse</source>
|
||||||
<translation>浏览</translation>
|
<translation>浏览</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-34"/>
|
|
||||||
<source>Object file output directory</source>
|
<source>Object file output directory</source>
|
||||||
<translation>目标文件输出文件夹</translation>
|
<translation type="vanished">目标文件输出文件夹</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="-53"/>
|
||||||
|
<source>Directory for output</source>
|
||||||
|
<translation>输出文件夹</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="+19"/>
|
||||||
|
<source>Directory for obj files</source>
|
||||||
|
<translation>obj文件夹</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+19"/>
|
<location line="+19"/>
|
||||||
|
@ -8825,7 +8833,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<message>
|
<message>
|
||||||
<location line="+25"/>
|
<location line="+25"/>
|
||||||
<source>Override output filename</source>
|
<source>Override output filename</source>
|
||||||
<translation>自定义可执行文件名</translation>
|
<translation>自定义项目输出文件名</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../settingsdialog/projectoutputwidget.cpp" line="+14"/>
|
<location filename="../settingsdialog/projectoutputwidget.cpp" line="+14"/>
|
||||||
|
@ -9057,7 +9065,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<context>
|
<context>
|
||||||
<name>QFileSystemModel</name>
|
<name>QFileSystemModel</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="-6540"/>
|
<location filename="../mainwindow.cpp" line="-6546"/>
|
||||||
<source><b>The name "%1" cannot be used.</b><p>Try using another name, with fewer characters or no punctuation marks.</source>
|
<source><b>The name "%1" cannot be used.</b><p>Try using another name, with fewer characters or no punctuation marks.</source>
|
||||||
<translation><b>文件名 "%1" 无法被使用!</b><p>可能是重名、过长、为空或者是使用了不能出现在文件名里的符号。</translation>
|
<translation><b>文件名 "%1" 无法被使用!</b><p>可能是重名、过长、为空或者是使用了不能出现在文件名里的符号。</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -9066,7 +9074,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<name>QObject</name>
|
<name>QObject</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../editorlist.cpp" line="+178"/>
|
<location filename="../editorlist.cpp" line="+178"/>
|
||||||
<location filename="../mainwindow.cpp" line="+3227"/>
|
<location filename="../mainwindow.cpp" line="+3233"/>
|
||||||
<source>Save</source>
|
<source>Save</source>
|
||||||
<translation>保存</translation>
|
<translation>保存</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -9551,7 +9559,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation type="vanished">下标"%1"越界</translation>
|
<translation type="vanished">下标"%1"越界</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../utils.cpp" line="+488"/>
|
<location filename="../utils.cpp" line="+486"/>
|
||||||
<source>bytes</source>
|
<source>bytes</source>
|
||||||
<translation>字节</translation>
|
<translation>字节</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -11782,7 +11790,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation type="vanished">在文件管理器中打开编译结果</translation>
|
<translation type="vanished">在文件管理器中打开编译结果</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+28"/>
|
<location line="+32"/>
|
||||||
<location line="+13"/>
|
<location line="+13"/>
|
||||||
<source>Read tools config failed</source>
|
<source>Read tools config failed</source>
|
||||||
<translation>读取工具配置失败</translation>
|
<translation>读取工具配置失败</translation>
|
||||||
|
|
|
@ -1297,12 +1297,12 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+260"/>
|
<location line="+262"/>
|
||||||
<source>Readonly</source>
|
<source>Readonly</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-5452"/>
|
<location line="-5454"/>
|
||||||
<location line="+505"/>
|
<location line="+505"/>
|
||||||
<source>Error Load File</source>
|
<source>Error Load File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -4061,7 +4061,7 @@
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.ui" line="+14"/>
|
<location filename="../mainwindow.ui" line="+14"/>
|
||||||
<location filename="../mainwindow.cpp" line="+1324"/>
|
<location filename="../mainwindow.cpp" line="+1330"/>
|
||||||
<source>Red Panda C++</source>
|
<source>Red Panda C++</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -5255,13 +5255,13 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="-8406"/>
|
<location filename="../mainwindow.cpp" line="-8412"/>
|
||||||
<location line="+72"/>
|
<location line="+72"/>
|
||||||
<location line="+9"/>
|
<location line="+9"/>
|
||||||
<location line="+8"/>
|
<location line="+8"/>
|
||||||
<location line="+9"/>
|
<location line="+9"/>
|
||||||
<location line="+61"/>
|
<location line="+61"/>
|
||||||
<location line="+1359"/>
|
<location line="+1365"/>
|
||||||
<location line="+1799"/>
|
<location line="+1799"/>
|
||||||
<location line="+117"/>
|
<location line="+117"/>
|
||||||
<location line="+1866"/>
|
<location line="+1866"/>
|
||||||
|
@ -5273,7 +5273,7 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-9506"/>
|
<location line="-9512"/>
|
||||||
<source>New</source>
|
<source>New</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -5299,18 +5299,18 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+85"/>
|
<location line="+85"/>
|
||||||
<location line="+8310"/>
|
<location line="+8316"/>
|
||||||
<source>Problem Set %1</source>
|
<source>Problem Set %1</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-7663"/>
|
<location line="-7669"/>
|
||||||
<location line="+6"/>
|
<location line="+6"/>
|
||||||
<source>Load Theme Error</source>
|
<source>Load Theme Error</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+325"/>
|
<location line="+331"/>
|
||||||
<location line="+2"/>
|
<location line="+2"/>
|
||||||
<location line="+30"/>
|
<location line="+30"/>
|
||||||
<location line="+2"/>
|
<location line="+2"/>
|
||||||
|
@ -6711,7 +6711,7 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="-5173"/>
|
<location filename="../mainwindow.cpp" line="-5179"/>
|
||||||
<source>Exact</source>
|
<source>Exact</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -6726,7 +6726,7 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+7043"/>
|
<location line="+7049"/>
|
||||||
<source>Folder Not Empty</source>
|
<source>Folder Not Empty</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -7762,21 +7762,25 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+6"/>
|
|
||||||
<location filename="../settingsdialog/projectoutputwidget.cpp" line="+67"/>
|
<location filename="../settingsdialog/projectoutputwidget.cpp" line="+67"/>
|
||||||
<source>Executable output directory</source>
|
<source>Executable output directory</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+9"/>
|
<location filename="../settingsdialog/projectoutputwidget.ui" line="+15"/>
|
||||||
<location line="+19"/>
|
<location line="+19"/>
|
||||||
<location line="+25"/>
|
<location line="+25"/>
|
||||||
<source>browse</source>
|
<source>browse</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-34"/>
|
<location line="-53"/>
|
||||||
<source>Object file output directory</source>
|
<source>Directory for output</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="+19"/>
|
||||||
|
<source>Directory for obj files</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -7981,7 +7985,7 @@
|
||||||
<context>
|
<context>
|
||||||
<name>QFileSystemModel</name>
|
<name>QFileSystemModel</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../mainwindow.cpp" line="-1214"/>
|
<location filename="../mainwindow.cpp" line="-1220"/>
|
||||||
<source><b>The name "%1" cannot be used.</b><p>Try using another name, with fewer characters or no punctuation marks.</source>
|
<source><b>The name "%1" cannot be used.</b><p>Try using another name, with fewer characters or no punctuation marks.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -8274,7 +8278,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../editorlist.cpp" line="+178"/>
|
<location filename="../editorlist.cpp" line="+178"/>
|
||||||
<location filename="../mainwindow.cpp" line="+3227"/>
|
<location filename="../mainwindow.cpp" line="+3233"/>
|
||||||
<source>Save</source>
|
<source>Save</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -8483,7 +8487,7 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../utils.cpp" line="+488"/>
|
<location filename="../utils.cpp" line="+486"/>
|
||||||
<source>bytes</source>
|
<source>bytes</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -10097,7 +10101,7 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+28"/>
|
<location line="+32"/>
|
||||||
<location line="+13"/>
|
<location line="+13"/>
|
||||||
<source>Read tools config failed</source>
|
<source>Read tools config failed</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
|
|
@ -201,8 +201,8 @@ QMap<QString, QString> devCppMacroVariables()
|
||||||
result["PROJECTFILENAME"] = extractFileName(e->filename());
|
result["PROJECTFILENAME"] = extractFileName(e->filename());
|
||||||
result["PROJECTPATH"] = localizePath(extractFileDir(e->filename()));
|
result["PROJECTPATH"] = localizePath(extractFileDir(e->filename()));
|
||||||
} else if (pMainWindow->project()) {
|
} else if (pMainWindow->project()) {
|
||||||
result["EXENAME"] = extractFileName(pMainWindow->project()->executable());
|
result["EXENAME"] = extractFileName(pMainWindow->project()->outputFilename());
|
||||||
result["EXEFILE"] = localizePath(pMainWindow->project()->executable());
|
result["EXEFILE"] = localizePath(pMainWindow->project()->outputFilename());
|
||||||
result["PROJECTNAME"] = pMainWindow->project()->name();
|
result["PROJECTNAME"] = pMainWindow->project()->name();
|
||||||
result["PROJECTFILE"] = localizePath(pMainWindow->project()->filename());
|
result["PROJECTFILE"] = localizePath(pMainWindow->project()->filename());
|
||||||
result["PROJECTFILENAME"] = extractFileName(pMainWindow->project()->filename());
|
result["PROJECTFILENAME"] = extractFileName(pMainWindow->project()->filename());
|
||||||
|
|
|
@ -60,4 +60,5 @@ extern const QChar SoftBreakGlyph;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif // CONSTANTS_H
|
#endif // CONSTANTS_H
|
||||||
|
|
|
@ -113,8 +113,8 @@ QSynEdit::QSynEdit(QWidget *parent) : QAbstractScrollArea(parent),
|
||||||
this->setFrameShape(QFrame::Panel);
|
this->setFrameShape(QFrame::Panel);
|
||||||
this->setFrameShadow(QFrame::Sunken);
|
this->setFrameShadow(QFrame::Sunken);
|
||||||
this->setLineWidth(1);
|
this->setLineWidth(1);
|
||||||
mInsertCaret = EditCaretType::ctVerticalLine;
|
mInsertCaret = EditCaretType::VerticalLine;
|
||||||
mOverwriteCaret = EditCaretType::ctBlock;
|
mOverwriteCaret = EditCaretType::Block;
|
||||||
mActiveSelectionMode = SelectionMode::Normal;
|
mActiveSelectionMode = SelectionMode::Normal;
|
||||||
mReadOnly = false;
|
mReadOnly = false;
|
||||||
|
|
||||||
|
@ -3675,7 +3675,7 @@ void QSynEdit::paintCaret(QPainter &painter, const QRect rcClip)
|
||||||
caretColor = mCaretColor;
|
caretColor = mCaretColor;
|
||||||
}
|
}
|
||||||
switch(ct) {
|
switch(ct) {
|
||||||
case EditCaretType::ctVerticalLine: {
|
case EditCaretType::VerticalLine: {
|
||||||
QRect caretRC;
|
QRect caretRC;
|
||||||
int size = std::max(1, mTextHeight/15);
|
int size = std::max(1, mTextHeight/15);
|
||||||
caretRC.setLeft(rcClip.left()+1);
|
caretRC.setLeft(rcClip.left()+1);
|
||||||
|
@ -3685,7 +3685,7 @@ void QSynEdit::paintCaret(QPainter &painter, const QRect rcClip)
|
||||||
painter.fillRect(caretRC,caretColor);
|
painter.fillRect(caretRC,caretColor);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EditCaretType::ctHorizontalLine: {
|
case EditCaretType::HorizontalLine: {
|
||||||
QRect caretRC;
|
QRect caretRC;
|
||||||
int size = std::max(1,mTextHeight/15);
|
int size = std::max(1,mTextHeight/15);
|
||||||
caretRC.setLeft(rcClip.left());
|
caretRC.setLeft(rcClip.left());
|
||||||
|
@ -3695,10 +3695,10 @@ void QSynEdit::paintCaret(QPainter &painter, const QRect rcClip)
|
||||||
painter.fillRect(caretRC,caretColor);
|
painter.fillRect(caretRC,caretColor);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EditCaretType::ctBlock:
|
case EditCaretType::Block:
|
||||||
painter.fillRect(rcClip, caretColor);
|
painter.fillRect(rcClip, caretColor);
|
||||||
break;
|
break;
|
||||||
case EditCaretType::ctHalfBlock:
|
case EditCaretType::HalfBlock:
|
||||||
QRect rc=rcClip;
|
QRect rc=rcClip;
|
||||||
rc.setTop(rcClip.top()+rcClip.height() / 2);
|
rc.setTop(rcClip.top()+rcClip.height() / 2);
|
||||||
painter.fillRect(rcClip, caretColor);
|
painter.fillRect(rcClip, caretColor);
|
||||||
|
|
|
@ -39,7 +39,7 @@ enum class ScrollStyle {
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class EditCaretType {
|
enum class EditCaretType {
|
||||||
ctVerticalLine=0, ctHorizontalLine=1, ctHalfBlock=2, ctBlock=3
|
VerticalLine=0, HorizontalLine=1, HalfBlock=2, Block=3
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class StatusChange {
|
enum class StatusChange {
|
||||||
|
@ -113,12 +113,6 @@ enum class SearchAction {
|
||||||
Exit
|
Exit
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum class TransientType {
|
|
||||||
ttBefore, ttAfter
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
using SynPaintTransientProc = std::function<void(const QPaintDevice& paintDevice,
|
using SynPaintTransientProc = std::function<void(const QPaintDevice& paintDevice,
|
||||||
SynTransientType transientType)>;
|
SynTransientType transientType)>;
|
||||||
|
|
|
@ -4288,7 +4288,7 @@
|
||||||
<context>
|
<context>
|
||||||
<name>QSynedit::Document</name>
|
<name>QSynedit::Document</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qsynedit/document.cpp" line="+616"/>
|
<location filename="qsynedit/document.cpp" line="+618"/>
|
||||||
<source>Can't open file '%1' for read!</source>
|
<source>Can't open file '%1' for read!</source>
|
||||||
<translation>无法读取文件"%1".</translation>
|
<translation>无法读取文件"%1".</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
Loading…
Reference in New Issue