diff --git a/NEWS.md b/NEWS.md index 8dfa7b15..4726a6e9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,7 @@ Red Panda C++ Version 2.13 - Enhancement: Support C11 anonymous struct/union - fix: Can't debug when debug a file while other file has breakpoints - change: Don't save breakpoints for non-project files + - Enhancement: Correctly init panel sizes when first run. Red Panda C++ Version 2.12 diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index 3a8c42ae..d06804de 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -3653,7 +3653,7 @@ void CppParser::handleVar(const QString& typePrefix,bool isExtern,bool isStatic) QString args; cmd=mTokenizer[mIndex]->text; parseCommandTypeAndArgs(cmd,suffix,args); - if (!cmd.isEmpty()) { + if (!cmd.isEmpty() && !isKeyword(cmd)) { addedVar = addChildStatement( getCurrentScope(), mCurrentFile, diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index 45c7ef79..56180f18 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -334,9 +334,9 @@ bool Settings::_Base::boolValue(const QString &key, bool defaultValue) return value(key,defaultValue).toBool(); } -QSize Settings::_Base::sizeValue(const QString &key) +QSize Settings::_Base::sizeValue(const QString &key, const QSize& size) { - return value(key,QSize()).toSize(); + return value(key,size).toSize(); } int Settings::_Base::intValue(const QString &key, int defaultValue) @@ -5722,8 +5722,8 @@ void Settings::UI::doLoad() mShrinkExplorerTabs = boolValue("shrink_explorer_tabs",false); mShrinkMessagesTabs = boolValue("shrink_messages_tabs",false); - mExplorerTabsSize = sizeValue("explorer_tabs_size"); - mMessagesTabsSize = sizeValue("messages_tabs_size"); + mExplorerTabsSize = sizeValue("explorer_tabs_size",QSize(300,600)); + mMessagesTabsSize = sizeValue("messages_tabs_size",QSize(450,150)); //view mShowToolbar = boolValue("show_toolbar",true); diff --git a/RedPandaIDE/settings.h b/RedPandaIDE/settings.h index aa28d4c9..f5f423d2 100644 --- a/RedPandaIDE/settings.h +++ b/RedPandaIDE/settings.h @@ -68,7 +68,7 @@ private: void saveValue(const QString &key, const QSet& set); QVariant value(const QString &key, const QVariant& defaultValue); bool boolValue(const QString &key, bool defaultValue); - QSize sizeValue(const QString &key); + QSize sizeValue(const QString &key, const QSize& size=QSize()); int intValue(const QString &key, int defaultValue); double doubleValue(const QString& key, double defaultValue); unsigned int uintValue(const QString &key, unsigned int defaultValue);