~lubuntu-dev/lxde/lxqt-openssh-askpass-ubuntu-tmp

« back to all changes in this revision

Viewing changes to src/main.cpp

  • Committer: Package Import Robot
  • Author(s): ChangZhuo Chen (陳昌倬)
  • Date: 2015-08-17 23:40:43 UTC
  • Revision ID: package-import@ubuntu.com-20150817234043-yhvbejawk1m3y5zm
Tags: upstream-0.9.0+20150817
Import upstream version 0.9.0+20150817

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* BEGIN_COMMON_COPYRIGHT_HEADER
 
2
 * (c)LGPL2+
 
3
 *
 
4
 * LXDE-Qt - a lightweight, Qt based, desktop toolset
 
5
 * http://razor-qt.org
 
6
 *
 
7
 * Copyright: 2012 Razor team
 
8
 * Authors:
 
9
 *   Petr Vanek <petr@scribus.info>
 
10
 *
 
11
 * This program or library is free software; you can redistribute it
 
12
 * and/or modify it under the terms of the GNU Lesser General Public
 
13
 * License as published by the Free Software Foundation; either
 
14
 * version 2.1 of the License, or (at your option) any later version.
 
15
 *
 
16
 * This library is distributed in the hope that it will be useful,
 
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
19
 * Lesser General Public License for more details.
 
20
 
 
21
 * You should have received a copy of the GNU Lesser General
 
22
 * Public License along with this library; if not, write to the
 
23
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
24
 * Boston, MA 02110-1301 USA
 
25
 *
 
26
 * END_COMMON_COPYRIGHT_HEADER */
 
27
 
 
28
#include <LXQt/Application>
 
29
#include "mainwindow.h"
 
30
 
 
31
 
 
32
int main(int argc, char *argv[])
 
33
{
 
34
    LxQt::Application a(argc, argv);
 
35
 
 
36
    // TODO/FIXME: maybe a better algorithm?
 
37
    QString prompt;
 
38
    if (a.arguments().count() < 2)
 
39
        prompt = QObject::tr("unknown request");
 
40
    else
 
41
        prompt = a.arguments().at(a.arguments().count()-1);
 
42
 
 
43
    MainWindow w(prompt);
 
44
    w.show();
 
45
 
 
46
    return a.exec();
 
47
}