- fix: c files added to a project will be compiled as c++ file.
This commit is contained in:
parent
67e686652d
commit
d01a60e88f
1
NEWS.md
1
NEWS.md
|
@ -2,6 +2,7 @@ Red Panda C++ Version 1.1.0
|
|||
- enhancement: when ctrl+mouse cursor hovered an identifier or header name, use underline to highlight it
|
||||
- enhancement: mark editor as modified, if the editing file is changed by other applications.
|
||||
- enhancement: When the editing files is changed by other applications, only show one notification dialog for each file.
|
||||
- fix: c files added to a project will be compiled as c++ file.
|
||||
|
||||
Red Panda C++ Version 1.0.10
|
||||
- fix: modify watch doesn't work
|
||||
|
|
|
@ -466,7 +466,7 @@ QString Compiler::getLibraryArguments(FileType fileType)
|
|||
int waitCount = 0;
|
||||
//wait parsing ends, at most 1 second
|
||||
while(parser->parsing()) {
|
||||
if (waitCount>0)
|
||||
if (waitCount>10)
|
||||
break;
|
||||
waitCount++;
|
||||
QThread::msleep(100);
|
||||
|
|
|
@ -278,13 +278,27 @@ PProjectUnit Project::newUnit(PProjectModelNode parentNode, const QString& custo
|
|||
false, parentNode));
|
||||
newUnit->node()->unitIndex = count;
|
||||
//parentNode.Expand(True);
|
||||
newUnit->setCompile(true);
|
||||
if (getFileType(customFileName) == FileType::CSource) {
|
||||
switch(getFileType(customFileName)) {
|
||||
case FileType::CSource:
|
||||
newUnit->setCompile(true);
|
||||
newUnit->setCompileCpp(false);
|
||||
} else {
|
||||
newUnit->setLink(true);
|
||||
break;
|
||||
case FileType::CppSource:
|
||||
newUnit->setCompile(true);
|
||||
newUnit->setCompileCpp(true);
|
||||
newUnit->setLink(true);
|
||||
break;
|
||||
case FileType::WindowsResourceSource:
|
||||
newUnit->setCompile(true);
|
||||
newUnit->setCompileCpp(mOptions.isCpp);
|
||||
newUnit->setLink(false);
|
||||
break;
|
||||
default:
|
||||
newUnit->setCompile(false);
|
||||
newUnit->setCompileCpp(false);
|
||||
newUnit->setLink(false);
|
||||
}
|
||||
newUnit->setLink(true);
|
||||
newUnit->setPriority(1000);
|
||||
newUnit->setOverrideBuildCmd(false);
|
||||
newUnit->setBuildCmd("");
|
||||
|
@ -976,7 +990,7 @@ PProjectUnit Project::addUnit(const QString &inFileName, PProjectModelNode paren
|
|||
switch(getFileType(inFileName)) {
|
||||
case FileType::CSource:
|
||||
newUnit->setCompile(true);
|
||||
newUnit->setCompileCpp(mOptions.isCpp);
|
||||
newUnit->setCompileCpp(false);
|
||||
newUnit->setLink(true);
|
||||
break;
|
||||
case FileType::CppSource:
|
||||
|
|
Loading…
Reference in New Issue