Skip to content

Commit

Permalink
Reformat with clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
danudey committed Oct 1, 2024
1 parent 7e1807c commit bc5bd2e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,23 @@ void wayland_hacks()
int suffixIndex;
DesktopInfo info;

const char *qt_version = qVersion();
const char* qt_version = qVersion();

QVersionNumber targetVersion(5, 15, 2);
QString string(qt_version);
QVersionNumber currentVersion = QVersionNumber::fromString(string, &suffixIndex);
QVersionNumber currentVersion =
QVersionNumber::fromString(string, &suffixIndex);

if (currentVersion < targetVersion) {
if (info.windowManager() == DesktopInfo::GNOME) {
qWarning() << "Qt versions lower than" << targetVersion.toString() <<
"on GNOME using Wayland have a bug when accessing the clipboard." <<
"Your version is" << currentVersion.toString() << "so we're forcing QT_QPA_PLATFORM to 'xcb'." <<
"To use native Wayland, please upgrade your Qt version to" << targetVersion.toString() << "or higher";
qWarning()
<< "Qt versions lower than" << targetVersion.toString()
<< "on GNOME using Wayland have a bug when accessing the "
"clipboard."
<< "Your version is" << currentVersion.toString()
<< "so we're forcing QT_QPA_PLATFORM to 'xcb'."
<< "To use native Wayland, please upgrade your Qt version to"
<< targetVersion.toString() << "or higher";
qputenv("QT_QPA_PLATFORM", "xcb");
}
}
Expand Down

0 comments on commit bc5bd2e

Please sign in to comment.