Ignore:
Timestamp:
Aug 21, 2013 9:55:52 AM (8 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
5313c46
Parents:
ea4b713
Message:

Update NetworkManager?, now it runs via single-instance and has a '-installer' mode option,
for use during the system installer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-netmanager/src/NetworkManager/main.cpp

    r1620346 rc9d1400  
    1 #include <qtranslator.h> 
     1#include <QApplication> 
    22#include <qlocale.h> 
     3#include <qtsingleapplication.h> 
    34#include <QDebug> 
    45#include <QFile> 
    5 #include <QApplication> 
     6#include <QObject> 
     7#include <QString> 
     8#include <QTranslator> 
    69#include "networkman.h" 
    710#include "../../../config.h" 
     
    912int main( int argc, char ** argv ) 
    1013{ 
    11     QApplication a(argc, argv); 
     14    QtSingleApplication a(argc, argv); 
     15    if (a.isRunning()) 
     16      return !(a.sendMessage("show")); 
    1217 
    1318    QTranslator translator; 
     
    2429    w.Init(); 
    2530 
     31    // Are we running via the system-installer? 
     32    if ( argc == 2 ) { 
     33       QString tmp = argv[1]; 
     34       if ( tmp == "-installer" ) 
     35         w.setInstallerMode(); 
     36    } 
     37 
    2638    w.show(); 
     39 
     40    a.connect( &a, SIGNAL( messageReceived(const QString &) ), &w, SLOT( slotSingleInstance() ) ); 
    2741    a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) ); 
    2842    return a.exec(); 
Note: See TracChangeset for help on using the changeset viewer.