All: Reformat according to new standard
This commit is contained in:
committed by
Kacper Donat
parent
eafd18dac0
commit
25c3ba7338
@@ -21,7 +21,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
|
||||
#include <cstdlib>
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
@@ -112,11 +111,13 @@ public:
|
||||
{
|
||||
return "SplashObserver";
|
||||
}
|
||||
void sendLog(const std::string& notifiername,
|
||||
const std::string& msg,
|
||||
Base::LogStyle level,
|
||||
Base::IntendedRecipient recipient,
|
||||
Base::ContentType content) override
|
||||
void sendLog(
|
||||
const std::string& notifiername,
|
||||
const std::string& msg,
|
||||
Base::LogStyle level,
|
||||
Base::IntendedRecipient recipient,
|
||||
Base::ContentType content
|
||||
) override
|
||||
{
|
||||
Q_UNUSED(notifiername)
|
||||
Q_UNUSED(recipient)
|
||||
@@ -172,10 +173,12 @@ private:
|
||||
* displayed as two lines, regardless of the length of the text (e.g. no wrapping is done). Only the
|
||||
* width is considered, the height simply follows from the font size.
|
||||
*/
|
||||
static void renderDevBuildWarning(QPainter& painter,
|
||||
const QPoint startPosition,
|
||||
const QSize maxSize,
|
||||
QColor color)
|
||||
static void renderDevBuildWarning(
|
||||
QPainter& painter,
|
||||
const QPoint startPosition,
|
||||
const QSize maxSize,
|
||||
QColor color
|
||||
)
|
||||
{
|
||||
// Create a background box that fades out the artwork for better legibility
|
||||
QColor fader(Qt::white);
|
||||
@@ -213,9 +216,7 @@ static void renderDevBuildWarning(QPainter& painter,
|
||||
painter.setPen(color);
|
||||
painter.drawRect(startPosition.x(), startPosition.y(), boxWidth, boxHeight);
|
||||
painter.drawText(startPosition.x() + padding, startPosition.y() + lineHeight, devWarningLine1);
|
||||
painter.drawText(startPosition.x() + padding,
|
||||
startPosition.y() + 2 * lineHeight,
|
||||
devWarningLine2);
|
||||
painter.drawText(startPosition.x() + padding, startPosition.y() + 2 * lineHeight, devWarningLine2);
|
||||
}
|
||||
|
||||
} // namespace Gui
|
||||
@@ -280,8 +281,9 @@ QPixmap SplashScreen::splashImage()
|
||||
float pixelRatio(1.0);
|
||||
if (splash_image.isNull()) {
|
||||
// determine the count of splashes
|
||||
QStringList pixmaps =
|
||||
Gui::BitmapFactory().findIconFiles().filter(QString::fromStdString(splash_path));
|
||||
QStringList pixmaps = Gui::BitmapFactory().findIconFiles().filter(
|
||||
QString::fromStdString(splash_path)
|
||||
);
|
||||
// divide by 2 since there's two sets (normal and 2x)
|
||||
// minus 1 to ignore the default splash that isn't numbered
|
||||
int splash_count = pixmaps.count() / 2 - 1;
|
||||
@@ -305,10 +307,12 @@ QPixmap SplashScreen::splashImage()
|
||||
}
|
||||
|
||||
// include application name and version number
|
||||
std::map<std::string, std::string>::const_iterator tc =
|
||||
App::Application::Config().find("SplashInfoColor");
|
||||
std::map<std::string, std::string>::const_iterator wc =
|
||||
App::Application::Config().find("SplashWarningColor");
|
||||
std::map<std::string, std::string>::const_iterator tc = App::Application::Config().find(
|
||||
"SplashInfoColor"
|
||||
);
|
||||
std::map<std::string, std::string>::const_iterator wc = App::Application::Config().find(
|
||||
"SplashWarningColor"
|
||||
);
|
||||
if (tc != App::Application::Config().end() && wc != App::Application::Config().end()) {
|
||||
QString title = qApp->applicationName();
|
||||
QString major = QString::fromStdString(App::Application::Config()["BuildVersionMajor"]);
|
||||
@@ -318,14 +322,18 @@ QPixmap SplashScreen::splashImage()
|
||||
QString version = QStringLiteral("%1.%2.%3%4").arg(major, minor, point, suffix);
|
||||
QString position, fontFamily;
|
||||
|
||||
std::map<std::string, std::string>::const_iterator te =
|
||||
App::Application::Config().find("SplashInfoExeName");
|
||||
std::map<std::string, std::string>::const_iterator tv =
|
||||
App::Application::Config().find("SplashInfoVersion");
|
||||
std::map<std::string, std::string>::const_iterator tp =
|
||||
App::Application::Config().find("SplashInfoPosition");
|
||||
std::map<std::string, std::string>::const_iterator tf =
|
||||
App::Application::Config().find("SplashInfoFont");
|
||||
std::map<std::string, std::string>::const_iterator te = App::Application::Config().find(
|
||||
"SplashInfoExeName"
|
||||
);
|
||||
std::map<std::string, std::string>::const_iterator tv = App::Application::Config().find(
|
||||
"SplashInfoVersion"
|
||||
);
|
||||
std::map<std::string, std::string>::const_iterator tp = App::Application::Config().find(
|
||||
"SplashInfoPosition"
|
||||
);
|
||||
std::map<std::string, std::string>::const_iterator tf = App::Application::Config().find(
|
||||
"SplashInfoFont"
|
||||
);
|
||||
if (te != App::Application::Config().end()) {
|
||||
title = QString::fromStdString(te->second);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user