mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-05 00:42:48 +00:00
formatting
This commit is contained in:
parent
5680008cae
commit
ee46b6bbab
@ -40,9 +40,8 @@ void CompatibilityInfoClass::UpdateCompatibilityDatabase(QWidget* parent) {
|
||||
|
||||
if (reply->error() != QNetworkReply::NoError) {
|
||||
reply->deleteLater();
|
||||
QMessageBox::critical(
|
||||
parent, tr("Error"),
|
||||
tr("Unable to update compatibility data! Try again later."));
|
||||
QMessageBox::critical(parent, tr("Error"),
|
||||
tr("Unable to update compatibility data! Try again later."));
|
||||
// Try loading compatibility_file.json again
|
||||
LoadCompatibilityFile();
|
||||
return;
|
||||
@ -141,11 +140,12 @@ bool CompatibilityInfoClass::LoadCompatibilityFile() {
|
||||
// Returns true if compatibility is loaded succescfully
|
||||
QFileInfo check_file(m_compatibility_filename);
|
||||
const auto modified_delta = QDateTime::currentDateTime() - check_file.lastModified();
|
||||
if (!check_file.exists() || !check_file.isFile() &&
|
||||
std::chrono::duration_cast<std::chrono::minutes>(modified_delta).count() > 60) {
|
||||
if (!check_file.exists() ||
|
||||
!check_file.isFile() &&
|
||||
std::chrono::duration_cast<std::chrono::minutes>(modified_delta).count() > 60) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QFile compatibility_file(m_compatibility_filename);
|
||||
if (!compatibility_file.open(QIODevice::ReadOnly)) {
|
||||
compatibility_file.close();
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "common/config.h"
|
||||
#include "core/file_format/psf.h"
|
||||
|
||||
static constexpr int COMPAT_DB_VERSION = 1;
|
||||
static constexpr int COMPAT_DB_VERSION = 1;
|
||||
|
||||
enum class CompatibilityStatus {
|
||||
Unknown,
|
||||
|
@ -75,7 +75,7 @@ GameListFrame::GameListFrame(std::shared_ptr<GameInfoClass> game_info_get,
|
||||
m_gui_context_menus.RequestGameMenu(pos, m_game_info->m_games, this, true);
|
||||
});
|
||||
|
||||
connect(this, &QTableWidget::cellClicked, this, [=](int row, int column) {
|
||||
connect(this, &QTableWidget::cellClicked, this, [=](int row, int column) {
|
||||
if (column == 2 && !m_game_info->m_games[row].compatibility.url.isEmpty()) {
|
||||
QDesktopServices::openUrl(QUrl(m_game_info->m_games[row].compatibility.url));
|
||||
}
|
||||
@ -263,12 +263,9 @@ void GameListFrame::SetCompatibilityItem(int row, int column, CompatibilityEntry
|
||||
tooltip_string = status_explanation;
|
||||
} else {
|
||||
tooltip_string =
|
||||
"<p> <i>" + tr("Click to go to issue") + "</i>" +
|
||||
"<br>" +
|
||||
tr("Last updated") +
|
||||
"<p> <i>" + tr("Click to go to issue") + "</i>" + "<br>" + tr("Last updated") +
|
||||
QString(": %1 (%2)").arg(entry.last_tested.toString("yyyy-MM-dd"), entry.version) +
|
||||
"<br>" +
|
||||
status_explanation + "</p>";
|
||||
"<br>" + status_explanation + "</p>";
|
||||
}
|
||||
|
||||
QPixmap circle_pixmap(16, 16);
|
||||
|
@ -93,7 +93,7 @@ private:
|
||||
PSF psf;
|
||||
|
||||
std::shared_ptr<GameInfoClass> m_game_info = std::make_shared<GameInfoClass>();
|
||||
std::shared_ptr<CompatibilityInfoClass> m_compat_info =
|
||||
std::shared_ptr<CompatibilityInfoClass> m_compat_info =
|
||||
std::make_shared<CompatibilityInfoClass>();
|
||||
|
||||
QTranslator* translator;
|
||||
|
Loading…
Reference in New Issue
Block a user