File indexing completed on 2024-04-28 16:26:06
0001 /* This file is part of the KDE project 0002 0003 begin : Sun Jun 9 12:15:11 CEST 2002 0004 0005 Copyright (C) 2003 Lucijan Busch <lucijan@gmx.at> 0006 Copyright (C) 2003 Joseph Wenninger <jowenn@kde.org> 0007 Copyright (C) 2003-2017 Jarosław Staniek <staniek@kde.org> 0008 0009 This program is free software; you can redistribute it and/or 0010 modify it under the terms of the GNU Library General Public 0011 License as published by the Free Software Foundation; either 0012 version 2 of the License, or (at your option) any later version. 0013 0014 This program is distributed in the hope that it will be useful, 0015 but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0017 Library General Public License for more details. 0018 0019 You should have received a copy of the GNU Library General Public License 0020 along with this library; see the file COPYING.LIB. If not, write to 0021 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0022 * Boston, MA 02110-1301, USA. 0023 */ 0024 0025 #include <QApplication> 0026 #include <main/KexiMainWindow.h> 0027 0028 int main(int argc, char *argv[]) 0029 { 0030 // Initialize before constructing QGuiApplication to avoid issue 0031 // "Qt WebEngine seems to be initialized from a plugin. Please set 0032 // Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing 0033 // QGuiApplication." 0034 QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); 0035 0036 //! @todo use non-GUI app when needed 0037 QApplication app(argc, argv); 0038 const int result = KexiMainWindow::create(QCoreApplication::arguments()); 0039 if (result != 0) { 0040 return result; 0041 } 0042 return app.exec(); 0043 }