Skip to content

Commit

Permalink
fix for Qt 6.8
Browse files Browse the repository at this point in the history
  • Loading branch information
soramimi committed Mar 30, 2024
1 parent 0696b6f commit c1a617f
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/BasicRepositoryDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
struct BasicRepositoryDialog::Private {
MainWindow *mainwindow = nullptr;
GitPtr git;
QList<Git::Remote> remotes;
std::vector<Git::Remote> remotes;
};

BasicRepositoryDialog::BasicRepositoryDialog(MainWindow *mainwindow, GitPtr g)
Expand Down Expand Up @@ -36,7 +36,7 @@ GitPtr BasicRepositoryDialog::git()
return m->git;
}

QList<Git::Remote> const *BasicRepositoryDialog::remotes() const
std::vector<Git::Remote> const *BasicRepositoryDialog::remotes() const
{
return &m->remotes;
}
Expand Down
2 changes: 1 addition & 1 deletion src/BasicRepositoryDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class BasicRepositoryDialog : public QDialog {
GitPtr git();
QString updateRemotesTable(QTableWidget *tablewidget);

const QList<Git::Remote> *remotes() const;
const std::vector<Git::Remote> *remotes() const;
void getRemotes_();
void setSshKey_(const QString &sshkey);
};
Expand Down
2 changes: 1 addition & 1 deletion src/CloneDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void CloneDialog::on_pushButton_open_existing_clicked()
if (QFileInfo(dir).isDir()) {
QString url;
GitPtr g = mainwindow()->git(dir, {}, {});
QList<Git::Remote> vec;
std::vector<Git::Remote> vec;
if (g->isValidWorkingCopy()) {
g->getRemoteURLs(&vec);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Git.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,7 @@ bool Git::rm_cached(QString const &file)
return git(cmd.arg(file));
}

void Git::getRemoteURLs(QList<Remote> *out)
void Git::getRemoteURLs(std::vector<Remote> *out)
{
out->clear();
git("remote -v");
Expand Down
2 changes: 1 addition & 1 deletion src/Git.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<Remote> *out);
void getRemoteURLs(std::vector<Remote> *out);
void createBranch(QString const &name);
void checkoutBranch(QString const &name);
void mergeBranch(QString const &name, MergeFastForward ff, bool squash);
Expand Down
4 changes: 2 additions & 2 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3957,7 +3957,7 @@ void MainWindow::detectGitServerType(GitPtr g)
*ptrGitHub() = GitHubRepositoryInfo();

QString push_url;
QList<Git::Remote> remotes;
std::vector<Git::Remote> remotes;
g->getRemoteURLs(&remotes);
for (Git::Remote const &r : remotes) {
if (r.purpose == "push") {
Expand Down Expand Up @@ -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<Git::Remote> remotes;
std::vector<Git::Remote> remotes;
git(repo->local_dir, {}, {})->getRemoteURLs(&remotes);
std::sort(remotes.begin(), remotes.end());
auto it = std::unique(remotes.begin(), remotes.end());
Expand Down
2 changes: 1 addition & 1 deletion src/RepositoryPropertyDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down
2 changes: 1 addition & 1 deletion src/SubmoduleAddDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void SubmoduleAddDialog::on_pushButton_open_existing_clicked()
if (QFileInfo(dir).isDir()) {
QString url;
GitPtr g = mainwindow()->git(dir, {}, {});
QList<Git::Remote> vec;
std::vector<Git::Remote> vec;
if (g->isValidWorkingCopy()) {
g->getRemoteURLs(&vec);
}
Expand Down
8 changes: 6 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c1a617f

Please sign in to comment.