• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

kcachegrind

  • sources
  • kde-4.12
  • kdesdk
  • kcachegrind
  • qcachegrind
qcgmain.cpp
Go to the documentation of this file.
1 /* This file is part of KCachegrind.
2  Copyright (C) 2003 Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
3 
4  KCachegrind is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public
6  License as published by the Free Software Foundation, version 2.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; see the file COPYING. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 /*
20  * QCachegrind startup
21  */
22 
23 #include <QDir>
24 #include <QApplication>
25 
26 #include "qcgconfig.h"
27 #include "config.h"
28 #include "globalguiconfig.h"
29 #include "qcgtoplevel.h"
30 #include "tracedata.h"
31 #include "loader.h"
32 
33 int main( int argc, char ** argv )
34 {
35  QApplication app(argc, argv);
36  Loader::initLoaders();
37 
38  QCoreApplication::setOrganizationName("kcachegrind.sf.net");
39  QCoreApplication::setApplicationName("QCachegrind");
40  ConfigStorage::setStorage(new QCGConfigStorage);
41  // creates global config object of type GlobalGUIConfig
42  //GlobalGUIConfig::config()->addDefaultTypes();
43 
44  QStringList list = app.arguments();
45  list.pop_front();
46  QCGTopLevel* t = new QCGTopLevel();
47  t->show();
48  if (list.isEmpty()) {
49  // load files in current dir
50  t->loadDelayed( ".", false);
51  }
52  else {
53  foreach(const QString& file, list)
54  t->loadDelayed( QDir::fromNativeSeparators(file) );
55  }
56 
57  int res = app.exec();
58 
59  // to make leak checking in valgrind happy...
60  Loader::deleteLoaders();
61  ProfileContext::cleanup();
62  ConfigStorage::cleanup();
63 
64  return res;
65 }
ConfigStorage::setStorage
static void setStorage(ConfigStorage *)
Definition: config.cpp:88
Loader::initLoaders
static void initLoaders()
Definition: loader.cpp:73
config.h
QCGTopLevel
Definition: qcgtoplevel.h:51
tracedata.h
loader.h
globalguiconfig.h
main
int main(int argc, char **argv)
Definition: qcgmain.cpp:33
QCGTopLevel::loadDelayed
void loadDelayed(QString file, bool addToRecentFiles=true)
Definition: qcgtoplevel.cpp:835
QCGConfigStorage
Definition: qcgconfig.h:51
ProfileContext::cleanup
static void cleanup()
Definition: context.cpp:46
qcgtoplevel.h
qcgconfig.h
Loader::deleteLoaders
static void deleteLoaders()
Definition: loader.cpp:79
ConfigStorage::cleanup
static void cleanup()
Definition: config.cpp:93
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:03:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kcachegrind

Skip menu "kcachegrind"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal