[Gui] Handle unset style preferences in clipboard about info
FIxes #16391
This commit is contained in:
committed by
Chris Hennes
parent
49ed687afc
commit
5bd595c0d3
@@ -881,9 +881,25 @@ void AboutDialog::copyToClipboard()
|
||||
}
|
||||
str << "\n";
|
||||
|
||||
// Add Stylesheet/Theme/Qtstyle information
|
||||
std::string styleSheet = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/MainWindow")->GetASCII("StyleSheet");
|
||||
std::string theme = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/MainWindow")->GetASCII("Theme");
|
||||
std::string style = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/MainWindow")->GetASCII("QtStyle");
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 1, 0)
|
||||
std::string style = qApp->style()->name().toStdString();
|
||||
#else
|
||||
std::string style = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/MainWindow")->GetASCII("QtStyle");
|
||||
if(style.empty()) {
|
||||
style = "Qt default";
|
||||
}
|
||||
#endif
|
||||
|
||||
if(styleSheet.empty()) {
|
||||
styleSheet = "unset";
|
||||
}
|
||||
if(theme.empty()) {
|
||||
theme = "unset";
|
||||
}
|
||||
|
||||
str << "Stylesheet/Theme/QtStyle: "
|
||||
<< QString::fromStdString(styleSheet) << "/"
|
||||
|
||||
Reference in New Issue
Block a user