jenkinsmain
Rev | Line | |
---|
[050d67a] | 1 | #include <QtGui/QApplication> |
---|
| 2 | #include <stdio.h> |
---|
[3648efe] | 3 | #include "mainwindow.h" |
---|
[553385e] | 4 | #include <Qt/qtextcodec.h> |
---|
[1ed6e72] | 5 | // Internacionalización con GNU Gettext. |
---|
| 6 | #include <libintl.h> |
---|
[6fd35b6] | 7 | #define TEXTDOMAIN "browser" |
---|
| 8 | #define LOCALEDIR "/opt/opengnsys/lib/locale" |
---|
| 9 | #define CHARSET "UTF-8" |
---|
[050d67a] | 10 | |
---|
| 11 | int main(int argc, char *argv[]) |
---|
| 12 | { |
---|
[1ed6e72] | 13 | // Preparar internacionalización. |
---|
| 14 | setlocale (LC_ALL, ""); |
---|
[6fd35b6] | 15 | bindtextdomain (TEXTDOMAIN, LOCALEDIR); |
---|
| 16 | textdomain (TEXTDOMAIN); |
---|
[1ed6e72] | 17 | |
---|
[3648efe] | 18 | if(argc<=1) |
---|
| 19 | { |
---|
[1ed6e72] | 20 | printf(gettext("Uso: %s -qws http://sitioweb.com/\n"),argv[0]); |
---|
[3648efe] | 21 | return -1; |
---|
| 22 | } |
---|
[6fd35b6] | 23 | // Codificación de caracteres. |
---|
| 24 | QTextCodec::setCodecForTr(QTextCodec::codecForName(CHARSET)); |
---|
| 25 | QTextCodec::setCodecForCStrings(QTextCodec::codecForName(CHARSET)); |
---|
| 26 | QTextCodec::setCodecForLocale(QTextCodec::codecForName(CHARSET)); |
---|
[1fc67a0] | 27 | |
---|
[3648efe] | 28 | QApplication a(argc, argv); |
---|
| 29 | MainWindow w; |
---|
| 30 | w.show(); |
---|
| 31 | return a.exec(); |
---|
[050d67a] | 32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.