- Enhancement: Correctly init panel sizes when first run.

This commit is contained in:
Roy Qu 2023-02-21 09:47:59 +08:00
parent fcca49e9e5
commit 457e84f86a
4 changed files with 7 additions and 6 deletions

View File

@ -6,6 +6,7 @@ Red Panda C++ Version 2.13
- Enhancement: Support C11 anonymous struct/union - Enhancement: Support C11 anonymous struct/union
- fix: Can't debug when debug a file while other file has breakpoints - fix: Can't debug when debug a file while other file has breakpoints
- change: Don't save breakpoints for non-project files - change: Don't save breakpoints for non-project files
- Enhancement: Correctly init panel sizes when first run.
Red Panda C++ Version 2.12 Red Panda C++ Version 2.12

View File

@ -3653,7 +3653,7 @@ void CppParser::handleVar(const QString& typePrefix,bool isExtern,bool isStatic)
QString args; QString args;
cmd=mTokenizer[mIndex]->text; cmd=mTokenizer[mIndex]->text;
parseCommandTypeAndArgs(cmd,suffix,args); parseCommandTypeAndArgs(cmd,suffix,args);
if (!cmd.isEmpty()) { if (!cmd.isEmpty() && !isKeyword(cmd)) {
addedVar = addChildStatement( addedVar = addChildStatement(
getCurrentScope(), getCurrentScope(),
mCurrentFile, mCurrentFile,

View File

@ -334,9 +334,9 @@ bool Settings::_Base::boolValue(const QString &key, bool defaultValue)
return value(key,defaultValue).toBool(); 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) int Settings::_Base::intValue(const QString &key, int defaultValue)
@ -5722,8 +5722,8 @@ void Settings::UI::doLoad()
mShrinkExplorerTabs = boolValue("shrink_explorer_tabs",false); mShrinkExplorerTabs = boolValue("shrink_explorer_tabs",false);
mShrinkMessagesTabs = boolValue("shrink_messages_tabs",false); mShrinkMessagesTabs = boolValue("shrink_messages_tabs",false);
mExplorerTabsSize = sizeValue("explorer_tabs_size"); mExplorerTabsSize = sizeValue("explorer_tabs_size",QSize(300,600));
mMessagesTabsSize = sizeValue("messages_tabs_size"); mMessagesTabsSize = sizeValue("messages_tabs_size",QSize(450,150));
//view //view
mShowToolbar = boolValue("show_toolbar",true); mShowToolbar = boolValue("show_toolbar",true);

View File

@ -68,7 +68,7 @@ private:
void saveValue(const QString &key, const QSet<QString>& set); void saveValue(const QString &key, const QSet<QString>& set);
QVariant value(const QString &key, const QVariant& defaultValue); QVariant value(const QString &key, const QVariant& defaultValue);
bool boolValue(const QString &key, bool 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); int intValue(const QString &key, int defaultValue);
double doubleValue(const QString& key, double defaultValue); double doubleValue(const QString& key, double defaultValue);
unsigned int uintValue(const QString &key, unsigned int defaultValue); unsigned int uintValue(const QString &key, unsigned int defaultValue);