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