diff --git a/src/BasicRepositoryDialog.cpp b/src/BasicRepositoryDialog.cpp index 5f4a0cc8..3abee935 100644 --- a/src/BasicRepositoryDialog.cpp +++ b/src/BasicRepositoryDialog.cpp @@ -6,7 +6,7 @@ struct BasicRepositoryDialog::Private { MainWindow *mainwindow = nullptr; GitPtr git; - QList remotes; + std::vector remotes; }; BasicRepositoryDialog::BasicRepositoryDialog(MainWindow *mainwindow, GitPtr g) @@ -36,7 +36,7 @@ GitPtr BasicRepositoryDialog::git() return m->git; } -QList const *BasicRepositoryDialog::remotes() const +std::vector const *BasicRepositoryDialog::remotes() const { return &m->remotes; } diff --git a/src/BasicRepositoryDialog.h b/src/BasicRepositoryDialog.h index 9607a644..c73645eb 100644 --- a/src/BasicRepositoryDialog.h +++ b/src/BasicRepositoryDialog.h @@ -20,7 +20,7 @@ class BasicRepositoryDialog : public QDialog { GitPtr git(); QString updateRemotesTable(QTableWidget *tablewidget); - const QList *remotes() const; + const std::vector *remotes() const; void getRemotes_(); void setSshKey_(const QString &sshkey); }; diff --git a/src/CloneDialog.cpp b/src/CloneDialog.cpp index 54a175af..c448cc6b 100644 --- a/src/CloneDialog.cpp +++ b/src/CloneDialog.cpp @@ -130,7 +130,7 @@ void CloneDialog::on_pushButton_open_existing_clicked() if (QFileInfo(dir).isDir()) { QString url; GitPtr g = mainwindow()->git(dir, {}, {}); - QList vec; + std::vector vec; if (g->isValidWorkingCopy()) { g->getRemoteURLs(&vec); } diff --git a/src/Git.cpp b/src/Git.cpp index 53e6a6b7..37e15600 100644 --- a/src/Git.cpp +++ b/src/Git.cpp @@ -1460,7 +1460,7 @@ bool Git::rm_cached(QString const &file) return git(cmd.arg(file)); } -void Git::getRemoteURLs(QList *out) +void Git::getRemoteURLs(std::vector *out) { out->clear(); git("remote -v"); diff --git a/src/Git.h b/src/Git.h index e0a5898c..1a96a5ee 100644 --- a/src/Git.h +++ b/src/Git.h @@ -535,7 +535,7 @@ class Git : QObject { bool commit_amend_m(QString const &text, bool sign, AbstractPtyProcess *pty); bool revert(const CommitID &id); bool push_tags(AbstractPtyProcess *pty = nullptr); - void getRemoteURLs(QList *out); + void getRemoteURLs(std::vector *out); void createBranch(QString const &name); void checkoutBranch(QString const &name); void mergeBranch(QString const &name, MergeFastForward ff, bool squash); diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 5a742520..9fe6df3c 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -3957,7 +3957,7 @@ void MainWindow::detectGitServerType(GitPtr g) *ptrGitHub() = GitHubRepositoryInfo(); QString push_url; - QList remotes; + std::vector remotes; g->getRemoteURLs(&remotes); for (Git::Remote const &r : remotes) { if (r.purpose == "push") { @@ -4588,7 +4588,7 @@ void MainWindow::on_treeWidget_repos_customContextMenuRequested(const QPoint &po strings.push_back(repo->name); strings.push_back(repo->local_dir); { - QList remotes; + std::vector remotes; git(repo->local_dir, {}, {})->getRemoteURLs(&remotes); std::sort(remotes.begin(), remotes.end()); auto it = std::unique(remotes.begin(), remotes.end()); diff --git a/src/RepositoryPropertyDialog.cpp b/src/RepositoryPropertyDialog.cpp index 675e27f9..46664da6 100644 --- a/src/RepositoryPropertyDialog.cpp +++ b/src/RepositoryPropertyDialog.cpp @@ -65,7 +65,7 @@ bool RepositoryPropertyDialog::execEditRemoteDialog(Git::Remote *remote, EditRem *remote = Git::Remote(); } - if (remote->name.isEmpty() && list->isEmpty()) { + if (remote->name.isEmpty() && list->empty()) { op = EditRemoteDialog::RemoteAdd; remote->name = "origin"; } diff --git a/src/SubmoduleAddDialog.cpp b/src/SubmoduleAddDialog.cpp index f5c0aad5..70a9f581 100644 --- a/src/SubmoduleAddDialog.cpp +++ b/src/SubmoduleAddDialog.cpp @@ -113,7 +113,7 @@ void SubmoduleAddDialog::on_pushButton_open_existing_clicked() if (QFileInfo(dir).isDir()) { QString url; GitPtr g = mainwindow()->git(dir, {}, {}); - QList vec; + std::vector vec; if (g->isValidWorkingCopy()) { g->getRemoteURLs(&vec); } diff --git a/src/main.cpp b/src/main.cpp index ffc84f19..189d8d10 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -93,10 +93,14 @@ int main(int argc, char *argv[]) QDir().mkpath(global->app_config_dir); } -// qputenv("QT_SCALE_FACTOR", "1.5"); +#ifdef Q_OS_WIN + putenv("QT_ENABLE_HIGHDPI_SCALING=1"); + // QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); +#endif + // qputenv("QT_SCALE_FACTOR", "1.5"); + QApplication a(argc, argv); -// a.setAttribute(Qt::AA_UseHighDpiPixmaps); global->init(&a);