- fix: can't show code completion popup if symbol is proceed with an operator '~' ( and it's not a destructor)
- fix: can't show code completion popup when define MACRO - fix: can't debug files with chinese characters in the path
This commit is contained in:
parent
ad7fb23117
commit
3d2fb53388
3
NEWS.md
3
NEWS.md
|
@ -1,6 +1,9 @@
|
|||
Version 0.8.4 For Dev-C++ 7 Beta
|
||||
- enhancement: auto save/load the default open folder in the configuration file
|
||||
- fix: shouldn't auto add '()' when char succeeding the completed function name is '('
|
||||
- fix: can't show code completion popup if symbol is proceed with an operator '~' ( and it's not a destructor)
|
||||
- fix: can't show code completion popup when define MACRO
|
||||
- fix: can't debug files with chinese characters in the path
|
||||
|
||||
Version 0.8.3 For Dev-C++ 7 Beta
|
||||
- enhancement: View menu
|
||||
|
|
|
@ -1450,9 +1450,9 @@ void DebugReader::runNextCmd()
|
|||
emit cmdStarted();
|
||||
|
||||
QByteArray s;
|
||||
s=pCmd->command.toUtf8();
|
||||
s=pCmd->command.toLocal8Bit();
|
||||
if (!pCmd->params.isEmpty()) {
|
||||
s+=' '+pCmd->params.toUtf8();
|
||||
s+= ' '+pCmd->params.toLocal8Bit();
|
||||
}
|
||||
s+= "\n";
|
||||
if (mProcess->write(s)<0) {
|
||||
|
@ -1681,7 +1681,7 @@ void DebugReader::run()
|
|||
readed = mProcess->readAll();
|
||||
buffer += readed;
|
||||
if (getLastAnnotation(buffer) == AnnotationType::TPrompt) {
|
||||
mOutput = QString::fromUtf8(buffer);
|
||||
mOutput = QString::fromLocal8Bit(buffer);
|
||||
processDebugOutput();
|
||||
buffer.clear();
|
||||
mCmdRunning = false;
|
||||
|
|
|
@ -2279,8 +2279,7 @@ void Editor::showCompletion(bool autoComplete)
|
|||
if (tokenType == SynHighlighterTokenType::PreprocessDirective) {//Preprocessor
|
||||
word = getWordAtPosition(this,caretXY(),pBeginPos,pEndPos, WordPurpose::wpDirective);
|
||||
if (!word.startsWith('#')) {
|
||||
//showTabnineCompletion();
|
||||
return;
|
||||
word = "";
|
||||
}
|
||||
} else if (tokenType == SynHighlighterTokenType::Comment) { //Comment, javadoc tag
|
||||
word = getWordAtPosition(this,caretXY(),pBeginPos,pEndPos, WordPurpose::wpJavadoc);
|
||||
|
|
|
@ -1296,7 +1296,6 @@ void MainWindow::debug()
|
|||
if (!mDebugger->start())
|
||||
return;
|
||||
filePath.replace('\\','/');
|
||||
mDebugger->sendCommand("set","host charset UTF-8");
|
||||
mDebugger->sendCommand("file", '"' + filePath + '"');
|
||||
|
||||
if (mProject->options().type == ProjectType::DynamicLib) {
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
<enum>QTabWidget::West</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="usesScrollButtons">
|
||||
<bool>true</bool>
|
||||
|
@ -171,10 +171,10 @@
|
|||
<enum>Qt::ElideNone</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="headerDefaultSectionSize">
|
||||
<number>50</number>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -72,6 +72,11 @@ void CodeCompletionPopup::prepareSearch(const QString &phrase, const QString &fi
|
|||
mIncludedFiles = mParser->getFileIncludes(filename);
|
||||
getCompletionFor(filename,phrase,line);
|
||||
|
||||
if (mFullCompletionStatementList.isEmpty() && phrase.startsWith('~')) {
|
||||
mPhrase = phrase.mid(1);
|
||||
getCompletionFor(filename,mPhrase,line);
|
||||
}
|
||||
|
||||
//todo: notify model
|
||||
//CodeComplForm.lbCompletion.Font.Size := FontSize;
|
||||
//CodeComplForm.lbCompletion.ItemHeight := CodeComplForm.lbCompletion.Canvas.TextHeight('F')+6;
|
||||
|
@ -110,6 +115,13 @@ bool CodeCompletionPopup::search(const QString &phrase, bool autoHideOnSingleRes
|
|||
QString symbol = phrase.mid(i);
|
||||
// filter fFullCompletionStatementList to fCompletionStatementList
|
||||
filterList(symbol);
|
||||
|
||||
//if can't find a destructor, maybe '~' is only an operator
|
||||
if (mCompletionStatementList.isEmpty() && phrase.startsWith('~')) {
|
||||
symbol = phrase.mid(1);
|
||||
filterList(symbol);
|
||||
}
|
||||
|
||||
mModel->notifyUpdated();
|
||||
setCursor(oldCursor);
|
||||
|
||||
|
|
Loading…
Reference in New Issue