Codebase list mozc / 068a1f3
Fix a runtime error on Linux. Hiroyuki Komatsu 3 years ago
2 changed file(s) with 4 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
4242 namespace gui {
4343
4444 // static
45 std::unique_ptr<QApplication> Util::InitQt(int argc, char *argv[]) {
45 std::unique_ptr<QApplication> Util::InitQt(int &argc, char *argv[]) {
4646 QApplication::setStyle(QStyleFactory::create("fusion"));
4747 #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
4848 QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
4949 #endif
5050
51 // QApplication takes argc as a reference.
5152 auto app = absl::make_unique<QApplication>(argc, argv);
5253 #ifdef __APPLE__
5354 app->setFont(QFont("Hiragino Sans"));
4040 class Util {
4141 public:
4242 // Initializes the common Qt cofiguration such as High DPI, font, and theme.
43 static std::unique_ptr<QApplication> InitQt(int argc, char *argv[]);
43 // The type of argc is a reference.
44 static std::unique_ptr<QApplication> InitQt(int &argc, char *argv[]);
4445
4546 // Returns the product name.
4647 static const QString ProductName();