work save: auto link
This commit is contained in:
parent
3c4a2ac9d2
commit
f0530d6737
|
@ -334,7 +334,7 @@ QString Compiler::getCppIncludeArguments()
|
|||
return result;
|
||||
}
|
||||
|
||||
QString Compiler::getLibraryArguments()
|
||||
QString Compiler::getLibraryArguments(FileType fileType)
|
||||
{
|
||||
QString result;
|
||||
|
||||
|
@ -344,7 +344,8 @@ QString Compiler::getLibraryArguments()
|
|||
|
||||
//Add auto links
|
||||
// is file and auto link enabled
|
||||
{
|
||||
if (fileType == FileType::CSource ||
|
||||
fileType == FileType::CppSource){
|
||||
Editor* editor = pMainWindow->editorList()->getEditor();
|
||||
if (editor) {
|
||||
PCppParser parser = editor->parser();
|
||||
|
@ -359,6 +360,7 @@ QString Compiler::getLibraryArguments()
|
|||
QApplication *app=dynamic_cast<QApplication*>(
|
||||
QApplication::instance());
|
||||
app->processEvents();
|
||||
}
|
||||
QSet<QString> parsedFiles;
|
||||
result += parseFileIncludesForAutolink(
|
||||
editor->filename(),
|
||||
|
@ -366,7 +368,6 @@ QString Compiler::getLibraryArguments()
|
|||
parser);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -461,7 +462,7 @@ void Compiler::runCommand(const QString &cmd, const QString &arguments, const Q
|
|||
if (errorOccurred) {
|
||||
switch (process.error()) {
|
||||
case QProcess::FailedToStart:
|
||||
throw CompileError(tr("The compiler process failed to start."));
|
||||
throw CompileError(tr("The compiler process for '%1' failed to start.").arg(mFilename));
|
||||
break;
|
||||
case QProcess::Crashed:
|
||||
if (!mStop)
|
||||
|
|
|
@ -49,7 +49,7 @@ protected:
|
|||
virtual QString getCppCompileArguments(bool checkSyntax);
|
||||
virtual QString getCIncludeArguments();
|
||||
virtual QString getCppIncludeArguments();
|
||||
virtual QString getLibraryArguments();
|
||||
virtual QString getLibraryArguments(FileType fileType);
|
||||
virtual QString parseFileIncludesForAutolink(
|
||||
const QString& filename,
|
||||
QSet<QString> parsedFiles,
|
||||
|
|
|
@ -61,7 +61,7 @@ bool FileCompiler::prepareForCompile()
|
|||
default:
|
||||
throw CompileError(tr("Can't find the compiler for file %1").arg(mFilename));
|
||||
}
|
||||
mArguments += getLibraryArguments();
|
||||
mArguments += getLibraryArguments(fileType);
|
||||
|
||||
if (!QFile(mCompiler).exists()) {
|
||||
throw CompileError(tr("The Compiler '%1' doesn't exists!").arg(mCompiler));
|
||||
|
|
|
@ -50,7 +50,7 @@ bool StdinCompiler::prepareForCompile()
|
|||
default:
|
||||
throw CompileError(tr("Can't find the compiler for file %1").arg(mFilename));
|
||||
}
|
||||
mArguments += getLibraryArguments();
|
||||
mArguments += getLibraryArguments(fileType);
|
||||
|
||||
if (!QFile(mCompiler).exists()) {
|
||||
throw CompileError(tr("The Compiler '%1' doesn't exists!").arg(mCompiler));
|
||||
|
|
|
@ -498,6 +498,7 @@ QSet<QString> CppParser::getFileDirectIncludes(const QString &filename)
|
|||
while (iter != fileIncludes->includeFiles.cend()) {
|
||||
if (iter.value())
|
||||
list.insert(iter.key());
|
||||
iter++;
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
|
|
@ -1242,7 +1242,7 @@ BufferCoord SynEdit::WordEndEx(const BufferCoord &XY)
|
|||
// valid line?
|
||||
if ((CY >= 1) && (CY <= mLines->count())) {
|
||||
QString Line = mLines->getString(CY - 1);
|
||||
if (CX <= Line.length()) {
|
||||
if (CX <= Line.length() && CX-2>=0) {
|
||||
if (isWordChar(Line[CX - 2]))
|
||||
CX = StrScanForNonWordChar(Line, CX);
|
||||
if (CX == 0)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
[{
|
||||
"header": "ege.h",
|
||||
"links": ["-lgraphics -luuid -lmsimg32 -lgdi32 -limm32 -lole32 -loleaut32 -lwinmm -lgdiplus"]
|
||||
"links": "-lgraphics -luuid -lmsimg32 -lgdi32 -limm32 -lole32 -loleaut32 -lwinmm -lgdiplus"
|
||||
},
|
||||
{
|
||||
"header": "turtle.h",
|
||||
"links": ["-lturtle"]
|
||||
"links": "-lturtle"
|
||||
}
|
||||
]
|
Loading…
Reference in New Issue