[Differential] [Commented On] D852: [Bug 347351] Display dialog to configure user.name or user.email in git, if commiting without it configured
mwolff (Milian Wolff)
noreply at phabricator.kde.org
Sat Jan 23 17:04:45 UTC 2016
mwolff added inline comments.
INLINE COMMENTS
plugins/git/gitnameemaildialog.cpp:40 use QRegularExpressionValidator
plugins/git/gitnameemaildialog.cpp:57 remove extra spaces
plugins/git/gitnameemaildialog.cpp:65 add newlines between functions
plugins/git/gitnameemaildialog.h:44 remove get prefix, i.e. follow the Qt style. Also remove the `Field` everywhere.
void setName(const QString& name); // also note the const!
void setEmail(const QString& email); // also note the const!
QString nameField() const;
QString emailField() const;
bool isGlobal() const;
plugins/git/gitnameemaildialog.h:51 both of these could be put into QScopedPointer or std::unique_ptr. Then remove the `delete ...` lines from the destructor. I.e. in the .cpp file then write:
GitNameEmailDialog::~GitNameEmailDialog() = default;
plugins/git/gitnameemaildialog.ui:53 rephrase slightly:
You have not yet configured the name and email to be associated with your Git commits.
The values you enter here will be written to the Git configuration, either locally for
the current project only, or globally for all Git projects.
plugins/git/gitnameemaildialog.ui:113 no buttonbox?
plugins/git/gitplugin.cpp:429 if (email.isEmpty() || name.isEmpty())
plugins/git/gitplugin.cpp:1482 please share code, make the QStringList accessible and append `--global` optionally. No need to copy'n'paste 99% of the code for just that purpose
plugins/git/gitplugin.cpp:1501 this may still break on windows, so either use QTextStream and it's readLine, or return a trimmed value. I can't think of a situation where that could break. Whitespaces in config values should not matter afaik.
plugins/git/tests/test_git.cpp:271 remove the QDebug, and rewrite this test to make it data-driven, (i.e. use QTest::newColumn, QTest::addRow, QFETCH and a testLocalConfig_data()).
plugins/git/tests/test_git.h:46 const& the QString args
REPOSITORY
rKDEVPLATFORM KDevPlatform
REVISION DETAIL
https://phabricator.kde.org/D852
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: apuzio, kfunk
Cc: mwolff, kdevelop-devel
More information about the KDevelop-devel
mailing list