forked from qt-creator/qt-creator
Git: Add input validation to RemoteAdditionDialog
Use FancyLineEdits to indicate invalid inputs for remote names and URLs. For remote names: * Check for duplicate remote names and indicate these * Remove invalid chars during input For remote URLs: * Check if the input matches a valid URL or existing local directory Task-number: QTCREATORBUG-15998 Change-Id: I224e669f16e34e2cd3d075c602b431ce5bbdd391 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
André Hartmann
parent
b0ac6435b3
commit
209cc21434
@@ -27,6 +27,8 @@
|
||||
#include "gitplugin.h"
|
||||
#include "gitclient.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
namespace Git {
|
||||
namespace Internal {
|
||||
|
||||
@@ -34,6 +36,11 @@ namespace Internal {
|
||||
RemoteModel::RemoteModel(QObject *parent) : QAbstractTableModel(parent)
|
||||
{ }
|
||||
|
||||
QStringList RemoteModel::allRemoteNames() const
|
||||
{
|
||||
return Utils::transform(m_remotes, std::mem_fn(&Remote::name));
|
||||
}
|
||||
|
||||
QString RemoteModel::remoteName(int row) const
|
||||
{
|
||||
return m_remotes.at(row).name;
|
||||
|
||||
Reference in New Issue
Block a user