- fix: crash when project name is selected in the project view and try create new project file
This commit is contained in:
parent
106bf4281a
commit
c3db151c2c
12
NEWS.md
12
NEWS.md
|
@ -1,3 +1,10 @@
|
||||||
|
Red Panda C++ Version 1.0.9
|
||||||
|
- fix: selection in column mode not correctly drawn when has wide chars in it
|
||||||
|
- fix: delete & insert in column mode not correctly handled
|
||||||
|
- fix: input with ime in column mode not correctly handled
|
||||||
|
- fix: copy & paste in column mode not correctly handled
|
||||||
|
- fix: crash when project name is selected in the project view and try create new project file
|
||||||
|
|
||||||
Red Panda C++ Version 1.0.8
|
Red Panda C++ Version 1.0.8
|
||||||
- enhancement: auto complete '#undef'
|
- enhancement: auto complete '#undef'
|
||||||
- enhancement: redesign components for compiler commandline arguments processing
|
- enhancement: redesign components for compiler commandline arguments processing
|
||||||
|
@ -9,11 +16,6 @@ Red Panda C++ Version 1.0.8
|
||||||
- enhancement: adjust scheme colors for "dark" and "high contrast" themes
|
- enhancement: adjust scheme colors for "dark" and "high contrast" themes
|
||||||
- enhancement: can debug files that has non-ascii chars in its path and is compiled by clang
|
- enhancement: can debug files that has non-ascii chars in its path and is compiled by clang
|
||||||
- fix: when debugging project, default compiler set is wrongly used
|
- fix: when debugging project, default compiler set is wrongly used
|
||||||
- fix: selection in column mode not correctly drawn when has wide chars in it
|
|
||||||
- fix: delete & insert in column mode not correctly handled
|
|
||||||
- fix: input with ime in column mode not correctly handled
|
|
||||||
- fix: copy & paste in column mode not correctly handled
|
|
||||||
|
|
||||||
|
|
||||||
Red Panda C++ Version 1.0.7
|
Red Panda C++ Version 1.0.7
|
||||||
- change: use Shift+Enter to break line
|
- change: use Shift+Enter to break line
|
||||||
|
|
|
@ -10,7 +10,7 @@ isEmpty(APP_NAME) {
|
||||||
}
|
}
|
||||||
|
|
||||||
isEmpty(APP_VERSION) {
|
isEmpty(APP_VERSION) {
|
||||||
APP_VERSION=1.0.8
|
APP_VERSION=1.0.9
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6029,22 +6029,32 @@ void MainWindow::newProjectUnitFile()
|
||||||
while (modelTypeNode && modelTypeNode->folderNodeType==ProjectSpecialFolderNode::NonSpecial) {
|
while (modelTypeNode && modelTypeNode->folderNodeType==ProjectSpecialFolderNode::NonSpecial) {
|
||||||
modelTypeNode=modelTypeNode->parent.lock();
|
modelTypeNode=modelTypeNode->parent.lock();
|
||||||
}
|
}
|
||||||
|
if (!modelTypeNode) {
|
||||||
|
modelTypeNode = mProject->rootNode();
|
||||||
|
}
|
||||||
NewProjectUnitDialog newProjectUnitDialog;
|
NewProjectUnitDialog newProjectUnitDialog;
|
||||||
switch (modelTypeNode->folderNodeType) {
|
if (modelTypeNode == mProject->rootNode()) {
|
||||||
case ProjectSpecialFolderNode::HEADERS:
|
|
||||||
newProjectUnitDialog.setSuffix("h");
|
|
||||||
break;
|
|
||||||
case ProjectSpecialFolderNode::SOURCES:
|
|
||||||
if (mProject->options().isCpp)
|
if (mProject->options().isCpp)
|
||||||
newProjectUnitDialog.setSuffix("cpp");
|
newProjectUnitDialog.setSuffix("cpp");
|
||||||
else
|
else
|
||||||
newProjectUnitDialog.setSuffix("c");
|
newProjectUnitDialog.setSuffix("c");
|
||||||
break;
|
} else {
|
||||||
default:
|
switch (modelTypeNode->folderNodeType) {
|
||||||
newProjectUnitDialog.setSuffix("");
|
case ProjectSpecialFolderNode::HEADERS:
|
||||||
|
newProjectUnitDialog.setSuffix("h");
|
||||||
|
break;
|
||||||
|
case ProjectSpecialFolderNode::SOURCES:
|
||||||
|
if (mProject->options().isCpp)
|
||||||
|
newProjectUnitDialog.setSuffix("cpp");
|
||||||
|
else
|
||||||
|
newProjectUnitDialog.setSuffix("c");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
newProjectUnitDialog.setSuffix("");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
QString folder = mProject->fileSystemNodeFolderPath(pNode);
|
QString folder = mProject->fileSystemNodeFolderPath(pNode);
|
||||||
qDebug()<<folder;
|
// qDebug()<<folder;
|
||||||
newProjectUnitDialog.setFolder(folder);
|
newProjectUnitDialog.setFolder(folder);
|
||||||
if (newProjectUnitDialog.exec()!=QDialog::Accepted) {
|
if (newProjectUnitDialog.exec()!=QDialog::Accepted) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -752,6 +752,8 @@ void Project::updateNodeIndexes()
|
||||||
|
|
||||||
PProjectModelNode Project::pointerToNode(ProjectModelNode *p, PProjectModelNode parent)
|
PProjectModelNode Project::pointerToNode(ProjectModelNode *p, PProjectModelNode parent)
|
||||||
{
|
{
|
||||||
|
if (!p)
|
||||||
|
return PProjectModelNode();
|
||||||
if (!parent) {
|
if (!parent) {
|
||||||
parent = mRootNode;
|
parent = mRootNode;
|
||||||
}
|
}
|
||||||
|
@ -1797,10 +1799,12 @@ QFileSystemWatcher *Project::fileSystemWatcher() const
|
||||||
QString Project::fileSystemNodeFolderPath(const PProjectModelNode &node)
|
QString Project::fileSystemNodeFolderPath(const PProjectModelNode &node)
|
||||||
{
|
{
|
||||||
QString result;
|
QString result;
|
||||||
PProjectModelNode pNode = node;
|
if (node != mRootNode) {
|
||||||
while (pNode && pNode->folderNodeType == ProjectSpecialFolderNode::NonSpecial) {
|
PProjectModelNode pNode = node;
|
||||||
result = node->text + "/" +result;
|
while (pNode && pNode->folderNodeType == ProjectSpecialFolderNode::NonSpecial) {
|
||||||
pNode = pNode->parent.lock();
|
result = node->text + "/" +result;
|
||||||
|
pNode = pNode->parent.lock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
result = folder() + "/" + result;
|
result = folder() + "/" + result;
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -17,7 +17,7 @@ SUBDIRS += \
|
||||||
|
|
||||||
APP_NAME = RedPandaCPP
|
APP_NAME = RedPandaCPP
|
||||||
|
|
||||||
APP_VERSION = 1.0.8
|
APP_VERSION = 1.0.9
|
||||||
|
|
||||||
linux: {
|
linux: {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue