Subset of clang-format changes.#966
Subset of clang-format changes.#966ahmedcharles merged 1 commit intoMudlet:developmentfrom ahmedcharles:f
Conversation
SlySven
left a comment
There was a problem hiding this comment.
Not all of my 24 comments actually need action!
| : QPlainTextEdit(parent) | ||
| , mpHost(pHost) | ||
| , mpConsole(pConsole) | ||
| , mSelectedText("") |
There was a problem hiding this comment.
Isn't the "" surplus to requirements here - and if it is a QString this is not ideal either {will trip up on future #define QT_NO_CAST_{TO|FROM}_ASCII}...
| QString spell_aff = path + pHost->mSpellDic + ".aff"; | ||
| QString spell_dic = path + pHost->mSpellDic + ".dic"; | ||
| mpHunspell = Hunspell_create( spell_aff.toLatin1().data(), spell_dic.toLatin1().data() );//"en_US.aff", "en_US.dic"); | ||
| mpHunspell = Hunspell_create(spell_aff.toLatin1().data(), spell_dic.toLatin1().data()); //"en_US.aff", "en_US.dic"); |
There was a problem hiding this comment.
We can lose the comments I think as well?
| mRegularPalette.setColor(QPalette::Base,mpHost->mCommandLineBgColor);//QColor(255,255,225)); | ||
| mRegularPalette.setColor(QPalette::Text, mpHost->mCommandLineFgColor); //QColor(0,0,192)); | ||
| mRegularPalette.setColor(QPalette::Highlight, QColor(0, 0, 192)); | ||
| mRegularPalette.setColor(QPalette::HighlightedText, QColor(255, 255, 255)); |
There was a problem hiding this comment.
I suspect this is Qt::white isn't it - which is easier on a (human) parser... 😀
| handleTabCompletion( true ); | ||
| ke->accept(); | ||
| return true; | ||
| break; |
| } | ||
| ke->accept(); | ||
| return true; | ||
| break; |
| } | ||
| if( toPlainText().size() > 0 ) | ||
| { | ||
| if (toPlainText().size() > 0) { |
There was a problem hiding this comment.
or:
if (! toPlainText().isEmpty()) {
I suppose?
| void TCommandLine::slot_sendCommand(const char* pS) | ||
| { | ||
| mpHost->sendRaw( QString(pS) ); | ||
| mpHost->sendRaw(QString(pS)); |
There was a problem hiding this comment.
🌍 Might this be Latin1 specific and need tweaking for I18n?
|
|
||
| buffer.replace(QChar( 0x21af ), "\n"); | ||
| buffer.replace(QChar('\n'), " " ); | ||
| buffer.replace(QChar(0x21af), "\n"); |
There was a problem hiding this comment.
🌍 That appear to be the '↯' codepoint {U+21af DOWNWARDS ZIGZAG ARROW in mathematical symbols, arrows}. Is this going to be tolerable if that character CAN appear in the data stream in future versions of Mudlet.
| || pH->mUrl.contains(QStringLiteral("aetolia.com"), Qt::CaseInsensitive) | ||
| || pH->mUrl.contains(QStringLiteral("imperian.com"), Qt::CaseInsensitive) | ||
| || pH->mUrl.contains(QStringLiteral("lusternia.com"), Qt::CaseInsensitive)) { | ||
| downloadMapOptions->setVisible(true); |
There was a problem hiding this comment.
Is this positioning now compulsory - I'd still like a line break before this to push it away from the conditions - helps my 👀 as they are getting older...!
There was a problem hiding this comment.
clang-format doesn't add blank lines to my knowledge. Is there a specific change you wanted to the .clang-format?
| pushButton_background_color->setStyleSheet( QStringLiteral( "QPushButton{background-color: %1;}" ).arg( mpHost->mBgColor.name() ) ); | ||
| pushButton_command_foreground_color->setStyleSheet( QStringLiteral( "QPushButton{background-color: %1;}" ).arg( mpHost->mCommandFgColor.name() ) ); | ||
| pushButton_command_background_color->setStyleSheet( QStringLiteral( "QPushButton{background-color: %1;}" ).arg( mpHost->mCommandBgColor.name() ) ); | ||
| pushButton_command_line_foreground_color->setStyleSheet(QStringLiteral("QPushButton{background-color: %1;}").arg(mpHost->mCommandLineFgColor.name())); |
There was a problem hiding this comment.
Pity about the loss of the indentation to line up on the assignment but dem's da breaks I guess...
|
You know, this whole clang-format thing isn't going to finish if the PR's keep getting blocked by non-formatting issues. And I'm also not comfortable changing non-formatting because that may break something that currently works. The fact that I add |
No description provided.