-
diff -r b193168bad98 src/accelUtil.cpp
|
|
|
27 | 27 | #include <accelUtil.h> |
28 | 28 | #include <resources.h> |
29 | 29 | |
30 | | #include <QtGui/QKeySequence> |
| 30 | #include <QKeySequence> |
31 | 31 | |
32 | 32 | #include <iostream> |
33 | 33 | #include <string.h> |
… |
… |
|
49 | 49 | QString cval = val.trimmed().toLower(); |
50 | 50 | |
51 | 51 | QKeySequence keyseq = QKeySequence::fromString( cval ); |
52 | | accel = (int)keyseq; |
| 52 | accel = keyseq[0]; |
53 | 53 | |
54 | 54 | // Check that converting back gets the original value |
55 | 55 | return ( cval == keyseq.toString().toLower() ); |
… |
… |
|
59 | 59 | // |
60 | 60 | void XxAccelUtil::write( std::ostream& os, int accel ) |
61 | 61 | { |
62 | | os << QKeySequence( accel ).toString().toAscii().constData(); |
| 62 | os << QKeySequence( accel ).toString().toLatin1().constData(); |
63 | 63 | } |
64 | 64 | |
65 | 65 | XX_NAMESPACE_END |
-
diff -r b193168bad98 src/accelUtil.h
|
|
|
32 | 32 | #endif |
33 | 33 | |
34 | 34 | #ifndef INCL_QT_QSTRING |
35 | | #include <QtCore/QString> |
| 35 | #include <QString> |
36 | 36 | #define INCL_QT_QSTRING |
37 | 37 | #endif |
38 | 38 | |
-
diff -r b193168bad98 src/app.cpp
|
|
|
49 | 49 | #include <central.h> |
50 | 50 | #include <borderLabel.h> |
51 | 51 | |
52 | | #include <QtGui/QMainWindow> |
53 | | #include <QtGui/QMenu> |
54 | | #include <QtGui/QMenuBar> |
55 | | #include <QtGui/QLayout> |
56 | | #include <QtGui/QScrollBar> |
57 | | #include <QtGui/QLabel> |
58 | | #include <QtGui/QStyleFactory> |
59 | | #include <QtGui/QFont> |
60 | | #include <QtGui/QMessageBox> |
61 | | #include <QtGui/QFileDialog> |
62 | | #include <QtGui/QShortcut> |
63 | | #include <QtGui/QWhatsThis> |
64 | | #include <QtGui/QClipboard> |
65 | | #include <QtCore/QProcess> |
66 | | #include <QtGui/QToolBar> |
67 | | #include <QtGui/QAction> |
68 | | #include <QtCore/QTextStream> |
69 | | #include <QtCore/QFile> |
70 | | #include <QtGui/QSplitter> |
71 | | #include <QtCore/QRegExp> |
72 | | #include <QtGui/QCheckBox> |
73 | | #include <QtCore/QDateTime> |
74 | | #include <QtGui/QPixmap> |
75 | | #include <QtGui/QHBoxLayout> |
76 | | #include <QtGui/QVBoxLayout> |
| 52 | #include <QMainWindow> |
| 53 | #include <QMenu> |
| 54 | #include <QMenuBar> |
| 55 | #include <QLayout> |
| 56 | #include <QScrollBar> |
| 57 | #include <QLabel> |
| 58 | #include <QStyleFactory> |
| 59 | #include <QFont> |
| 60 | #include <QMessageBox> |
| 61 | #include <QFileDialog> |
| 62 | #include <QShortcut> |
| 63 | #include <QWhatsThis> |
| 64 | #include <QClipboard> |
| 65 | #include <QProcess> |
| 66 | #include <QToolBar> |
| 67 | #include <QAction> |
| 68 | #include <QTextStream> |
| 69 | #include <QFile> |
| 70 | #include <QSplitter> |
| 71 | #include <QRegExp> |
| 72 | #include <QCheckBox> |
| 73 | #include <QDateTime> |
| 74 | #include <QPixmap> |
| 75 | #include <QHBoxLayout> |
| 76 | #include <QVBoxLayout> |
77 | 77 | |
78 | 78 | |
79 | 79 | #ifdef XX_KDE |
… |
… |
|
179 | 179 | XxMainWindow( |
180 | 180 | XxApp* app, |
181 | 181 | QWidget* parent = 0, |
182 | | Qt::WFlags f = Qt::Window |
| 182 | Qt::WindowFlags f = Qt::Window |
183 | 183 | ); |
184 | 184 | |
185 | 185 | |
… |
… |
|
197 | 197 | XxMainWindow::XxMainWindow( |
198 | 198 | XxApp* app, |
199 | 199 | QWidget* parent, |
200 | | Qt::WFlags f |
| 200 | Qt::WindowFlags f |
201 | 201 | ) : |
202 | 202 | QkMainWindow( parent, f ), |
203 | 203 | _app( app ) |
… |
… |
|
2283 | 2283 | if ( _resources->getBoolOpt( BOOL_DIRDIFF_RECURSIVE ) ) { |
2284 | 2284 | dirdiff_command = _resources->getCommand( |
2285 | 2285 | CMD_DIFF_DIRECTORIES_REC |
2286 | | ).toAscii(); |
| 2286 | ).toLatin1(); |
2287 | 2287 | } |
2288 | 2288 | else { |
2289 | 2289 | dirdiff_command = _resources->getCommand( |
2290 | 2290 | CMD_DIFF_DIRECTORIES |
2291 | | ).toAscii(); |
| 2291 | ).toLatin1(); |
2292 | 2292 | } |
2293 | 2293 | std::auto_ptr<XxDiffs> tmp( |
2294 | 2294 | dirsBuilder->process( dirdiff_command.constData(), *_files[0], *_files[1] ) |
… |
… |
|
3547 | 3547 | |
3548 | 3548 | if ( filenames.count() > 0 ) { |
3549 | 3549 | // Spawn a diff. |
3550 | | QString command = argv()[0]; |
| 3550 | QString command = arguments()[0]; |
3551 | 3551 | |
3552 | 3552 | if ( filenames.count() == 1 ) { |
3553 | 3553 | command += QString(" --single "); |
-
diff -r b193168bad98 src/app.h
|
|
|
48 | 48 | #endif |
49 | 49 | |
50 | 50 | #ifndef INCL_QT_QAPPLICATION |
51 | | #include <QtGui/QApplication> |
| 51 | #include <QApplication> |
52 | 52 | #define INCL_QT_QAPPLICATION |
53 | 53 | #endif |
54 | 54 | |
55 | 55 | #ifndef INCL_QT_QFILEINFO |
56 | | #include <QtCore/QFileInfo> |
| 56 | #include <QFileInfo> |
57 | 57 | #define INCL_QT_QFILEINFO |
58 | 58 | #endif |
59 | 59 | |
-
diff -r b193168bad98 src/app.inline.h
|
|
|
37 | 37 | #endif |
38 | 38 | |
39 | 39 | #ifndef INCL_QT_QSCROLLBAR |
40 | | #include <QtGui/QScrollBar> |
| 40 | #include <QScrollBar> |
41 | 41 | #define INCL_QT_QSCROLLBAR |
42 | 42 | #endif |
43 | 43 | |
-
diff -r b193168bad98 src/borderLabel.cpp
|
|
|
27 | 27 | #include <borderLabel.h> |
28 | 28 | #include <app.h> |
29 | 29 | |
30 | | #include <QtGui/QPainter> |
31 | | #include <QtGui/QBrush> |
32 | | #include <QtGui/QPen> |
33 | | #include <QtGui/QColor> |
| 30 | #include <QPainter> |
| 31 | #include <QBrush> |
| 32 | #include <QPen> |
| 33 | #include <QColor> |
34 | 34 | |
35 | | #include <QtGui/QApplication> |
36 | | #include <QtGui/QLabel> |
| 35 | #include <QApplication> |
| 36 | #include <QLabel> |
37 | 37 | |
38 | 38 | #include <stdio.h> |
39 | 39 | |
-
diff -r b193168bad98 src/borderLabel.h
|
|
|
36 | 36 | #endif |
37 | 37 | |
38 | 38 | #ifndef INCL_QT_QLABEL |
39 | | #include <QtGui/QLabel> |
| 39 | #include <QLabel> |
40 | 40 | #define INCL_QT_QLABEL |
41 | 41 | #endif |
42 | 42 | |
-
diff -r b193168bad98 src/buffer.cpp
|
|
|
28 | 28 | #include <exceptions.h> |
29 | 29 | #include <util.h> |
30 | 30 | |
31 | | #include <QtGui/QFontMetrics> |
32 | | #include <QtGui/QFont> |
33 | | #include <QtCore/QRect> |
34 | | #include <QtCore/QDir> |
| 31 | #include <QFontMetrics> |
| 32 | #include <QFont> |
| 33 | #include <QRect> |
| 34 | #include <QDir> |
35 | 35 | |
36 | 36 | #include <iostream> |
37 | 37 | #include <string.h> |
-
diff -r b193168bad98 src/buffer.h
|
|
|
51 | 51 | #endif |
52 | 52 | |
53 | 53 | #ifndef INCL_QT_QSTRING |
54 | | #include <QtCore/QString> |
| 54 | #include <QString> |
55 | 55 | #define INCL_QT_QSTRING |
56 | 56 | #endif |
57 | 57 | |
58 | 58 | #ifndef INCL_QT_QSTRINGLIST |
59 | | #include <QtCore/QStringList> |
| 59 | #include <QStringList> |
60 | 60 | #define INCL_QT_QSTRINGLIST |
61 | 61 | #endif |
62 | 62 | |
63 | 63 | #ifndef INCL_QT_QFILEINFO |
64 | | #include <QtCore/QFileInfo> |
| 64 | #include <QFileInfo> |
65 | 65 | #define INCL_QT_QFILEINFO |
66 | 66 | #endif |
67 | 67 | |
-
diff -r b193168bad98 src/builderDirs2.cpp
|
|
|
30 | 30 | #include <util.h> |
31 | 31 | #include <buffer.h> |
32 | 32 | |
33 | | #include <QtCore/QString> |
34 | | #include <QtCore/QByteArray> |
35 | | #include <QtCore/QStringList> |
36 | | #include <QtCore/QTextStream> |
37 | | #include <QtCore/QFile> |
38 | | #include <QtCore/QProcess> |
| 33 | #include <QString> |
| 34 | #include <QByteArray> |
| 35 | #include <QStringList> |
| 36 | #include <QTextStream> |
| 37 | #include <QFile> |
| 38 | #include <QProcess> |
39 | 39 | |
40 | 40 | #include <stdexcept> |
41 | 41 | #include <stdio.h> |
-
diff -r b193168bad98 src/builderFiles2.cpp
|
|
|
31 | 31 | #include <diffutils.h> |
32 | 32 | #include <buffer.h> |
33 | 33 | |
34 | | #include <QtCore/QString> |
35 | | #include <QtCore/QByteArray> |
36 | | #include <QtCore/QTextStream> |
37 | | #include <QtCore/QFile> |
38 | | #include <QtCore/QProcess> |
| 34 | #include <QString> |
| 35 | #include <QByteArray> |
| 36 | #include <QTextStream> |
| 37 | #include <QFile> |
| 38 | #include <QProcess> |
39 | 39 | |
40 | 40 | #include <stdexcept> |
41 | 41 | #include <stdio.h> |
-
diff -r b193168bad98 src/builderFiles3.cpp
|
|
|
30 | 30 | #include <util.h> |
31 | 31 | #include <buffer.h> |
32 | 32 | |
33 | | #include <QtCore/QString> |
34 | | #include <QtCore/QByteArray> |
35 | | #include <QtCore/QTextStream> |
36 | | #include <QtCore/QFile> |
37 | | #include <QtCore/QProcess> |
| 33 | #include <QString> |
| 34 | #include <QByteArray> |
| 35 | #include <QTextStream> |
| 36 | #include <QFile> |
| 37 | #include <QProcess> |
38 | 38 | |
39 | 39 | #include <stdexcept> |
40 | 40 | #include <stdio.h> |
-
diff -r b193168bad98 src/builderSingle.cpp
|
|
|
28 | 28 | #include <diffs.h> |
29 | 29 | #include <buffer.h> |
30 | 30 | |
31 | | #include <QtCore/QTextStream> |
| 31 | #include <QTextStream> |
32 | 32 | |
33 | 33 | #include <stdio.h> |
34 | 34 | #include <iostream> |
-
diff -r b193168bad98 src/builderUnmerge.cpp
|
|
|
29 | 29 | #include <buffer.h> |
30 | 30 | #include <resources.h> |
31 | 31 | |
32 | | #include <QtCore/QByteArray> |
33 | | #include <QtCore/QTextStream> |
34 | | #include <QtCore/QRegExp> |
| 32 | #include <QByteArray> |
| 33 | #include <QTextStream> |
| 34 | #include <QRegExp> |
35 | 35 | |
36 | 36 | #include <stdio.h> |
37 | 37 | #include <iostream> |
-
diff -r b193168bad98 src/central.cpp
|
|
|
35 | 35 | #include <borderLabel.h> |
36 | 36 | #include <help.h> |
37 | 37 | |
38 | | #include <QtGui/QPainter> |
39 | | #include <QtGui/QBrush> |
40 | | #include <QtGui/QPen> |
41 | | #include <QtGui/QColor> |
42 | | #include <QtGui/QLayout> |
43 | | #include <QtGui/QShortcut> |
| 38 | #include <QPainter> |
| 39 | #include <QBrush> |
| 40 | #include <QPen> |
| 41 | #include <QColor> |
| 42 | #include <QLayout> |
| 43 | #include <QShortcut> |
44 | 44 | |
45 | | #include <QtGui/QApplication> |
46 | | #include <QtGui/QClipboard> |
47 | | #include <QtGui/QHBoxLayout> |
48 | | #include <QtGui/QFrame> |
49 | | #include <QtGui/QLabel> |
50 | | #include <QtGui/QVBoxLayout> |
| 45 | #include <QApplication> |
| 46 | #include <QClipboard> |
| 47 | #include <QHBoxLayout> |
| 48 | #include <QFrame> |
| 49 | #include <QLabel> |
| 50 | #include <QVBoxLayout> |
51 | 51 | |
52 | 52 | #include <math.h> |
53 | 53 | #include <stdio.h> |
-
diff -r b193168bad98 src/central.h
|
|
|
40 | 40 | #endif |
41 | 41 | |
42 | 42 | #ifndef INCL_QT_QMAINWINDOW |
43 | | #include <QtGui/QMainWindow> |
| 43 | #include <QMainWindow> |
44 | 44 | #define INCL_QT_QMAINWINDOW |
45 | 45 | #endif |
46 | 46 | |
47 | 47 | #ifndef INCL_QT_QFRAME |
48 | | #include <QtGui/QFrame> |
| 48 | #include <QFrame> |
49 | 49 | #define INCL_QT_QFRAME |
50 | 50 | #endif |
51 | 51 | |
-
diff -r b193168bad98 src/cmdline.cpp
|
|
|
36 | 36 | |
37 | 37 | #include <kdeSupport.h> |
38 | 38 | |
39 | | #include <QtGui/QApplication> |
40 | | #include <QtCore/QByteArray> |
41 | | #include <QtCore/QTextStream> |
| 39 | #include <QApplication> |
| 40 | #include <QByteArray> |
| 41 | #include <QTextStream> |
42 | 42 | |
43 | 43 | /*#define getopt xxdiff_getopt*/ |
44 | 44 | #include <getopt.h> |
-
diff -r b193168bad98 src/copyLabel.cpp
|
|
|
28 | 28 | |
29 | 29 | #include <kdeSupport.h> |
30 | 30 | |
31 | | #include <QtGui/QToolTip> |
| 31 | #include <QToolTip> |
32 | 32 | |
33 | | #include <QtGui/QApplication> |
34 | | #include <QtGui/QClipboard> |
35 | | #include <QtGui/QResizeEvent> |
36 | | #include <QtGui/QMouseEvent> |
37 | | #include <QtGui/QLabel> |
| 33 | #include <QApplication> |
| 34 | #include <QClipboard> |
| 35 | #include <QResizeEvent> |
| 36 | #include <QMouseEvent> |
| 37 | #include <QLabel> |
38 | 38 | |
39 | 39 | |
40 | 40 | /*============================================================================== |
-
diff -r b193168bad98 src/copyLabel.h
|
|
|
36 | 36 | #endif |
37 | 37 | |
38 | 38 | #ifndef INCL_QT_QLABEL |
39 | | #include <QtGui/QLabel> |
| 39 | #include <QLabel> |
40 | 40 | #define INCL_QT_QLABEL |
41 | 41 | #endif |
42 | 42 | |
-
diff -r b193168bad98 src/diffs.cpp
|
|
|
28 | 28 | #include <buffer.h> |
29 | 29 | #include <resources.h> |
30 | 30 | |
31 | | #include <QtCore/QTextStream> |
| 31 | #include <QTextStream> |
32 | 32 | |
33 | 33 | #include <list> |
34 | 34 | #include <algorithm> |
-
diff -r b193168bad98 src/diffs.h
|
|
|
40 | 40 | #endif |
41 | 41 | |
42 | 42 | #ifndef INCL_QT_QOBJECT |
43 | | #include <QtCore/QObject> |
| 43 | #include <QObject> |
44 | 44 | #define INCL_QT_QOBJECT |
45 | 45 | #endif |
46 | 46 | |
-
diff -r b193168bad98 src/diffutils.h
|
|
|
32 | 32 | #endif |
33 | 33 | |
34 | 34 | #ifndef INCL_QT_QSTRING |
35 | | #include <QtCore/QString> |
| 35 | #include <QString> |
36 | 36 | #define INCL_QT_QSTRING |
37 | 37 | #endif |
38 | 38 | |
-
diff -r b193168bad98 src/exceptions.cpp
|
|
|
28 | 28 | #include <cmdline.h> |
29 | 29 | #include <help.h> |
30 | 30 | |
31 | | #include <QtCore/QTextStream> |
| 31 | #include <QTextStream> |
32 | 32 | |
33 | 33 | #include <iostream> |
34 | 34 | #include <string.h> // strerror |
-
diff -r b193168bad98 src/exceptions.h
|
|
|
33 | 33 | #endif |
34 | 34 | |
35 | 35 | #ifndef INCL_QT_QSTRING |
36 | | #include <QtCore/QString> |
| 36 | #include <QString> |
37 | 37 | #define INCL_QT_QSTRING |
38 | 38 | #endif |
39 | 39 | |
40 | 40 | #ifndef INCL_QT_QTEXTSTREAM |
41 | | #include <QtCore/QTextStream> |
| 41 | #include <QTextStream> |
42 | 42 | #define INCL_QT_QTEXTSTREAM |
43 | 43 | #endif |
44 | 44 | |
-
diff -r b193168bad98 src/help.cpp
|
|
|
32 | 32 | #include <resParser.h> |
33 | 33 | |
34 | 34 | #include <kdeSupport.h> |
35 | | #include <QtGui/QPixmap> |
36 | | #include <QtCore/QTextStream> |
37 | | #include <QtGui/QVBoxLayout> |
| 35 | #include <QPixmap> |
| 36 | #include <QTextStream> |
| 37 | #include <QVBoxLayout> |
38 | 38 | |
39 | 39 | namespace XX_NAMESPACE_PREFIX { namespace Manual { |
40 | 40 | #if !defined(WINDOWS) && !defined(__APPLE__) && !defined(__CYGWIN__) |
… |
… |
|
44 | 44 | #endif |
45 | 45 | }} |
46 | 46 | |
47 | | #include <QtGui/QDialog> |
48 | | #include <QtGui/QMessageBox> |
49 | | #include <QtGui/QLayout> |
50 | | #include <QtGui/QLabel> |
51 | | #include <QtGui/QPushButton> |
52 | | #include <QtGui/QPalette> |
53 | | #include <QtGui/QTextBrowser> |
54 | | #include <QtCore/QByteArray> |
55 | | #include <QtGui/QLineEdit> |
| 47 | #include <QDialog> |
| 48 | #include <QMessageBox> |
| 49 | #include <QLayout> |
| 50 | #include <QLabel> |
| 51 | #include <QPushButton> |
| 52 | #include <QPalette> |
| 53 | #include <QTextBrowser> |
| 54 | #include <QByteArray> |
| 55 | #include <QLineEdit> |
56 | 56 | |
57 | 57 | #include <iostream> |
58 | 58 | #include <stdio.h> |
-
diff -r b193168bad98 src/help.h
|
|
|
36 | 36 | #endif |
37 | 37 | |
38 | 38 | #ifndef INCL_QT_QDIALOG |
39 | | #include <QtGui/QDialog> |
| 39 | #include <QDialog> |
40 | 40 | #define INCL_QT_QDIALOG |
41 | 41 | #endif |
42 | 42 | |
-
diff -r b193168bad98 src/hordiffImp.cpp
|
|
|
27 | 27 | #include <hordiffImp.h> |
28 | 28 | #include <resources.h> |
29 | 29 | |
30 | | #include <QtCore/QByteArray> |
| 30 | #include <QByteArray> |
31 | 31 | |
32 | 32 | #ifndef COMPILER_MIPSPRO |
33 | 33 | #include <cctype> // isspace() |
-
diff -r b193168bad98 src/line.h
|
|
|
41 | 41 | #endif |
42 | 42 | |
43 | 43 | #ifndef INCL_QT_QSTRING |
44 | | #include <QtCore/QString> |
| 44 | #include <QString> |
45 | 45 | #define INCL_QT_QSTRING |
46 | 46 | #endif |
47 | 47 | |
-
diff -r b193168bad98 src/lineNumbers.cpp
|
|
|
32 | 32 | #include <buffer.h> |
33 | 33 | #include <text.h> |
34 | 34 | |
35 | | #include <QtGui/QPainter> |
36 | | #include <QtGui/QBrush> |
37 | | #include <QtGui/QPen> |
38 | | #include <QtGui/QColor> |
| 35 | #include <QPainter> |
| 36 | #include <QBrush> |
| 37 | #include <QPen> |
| 38 | #include <QColor> |
39 | 39 | |
40 | | #include <QtGui/QApplication> |
41 | | #include <QtGui/QClipboard> |
42 | | #include <QtGui/QFrame> |
| 40 | #include <QApplication> |
| 41 | #include <QClipboard> |
| 42 | #include <QFrame> |
43 | 43 | |
44 | 44 | #include <math.h> |
45 | 45 | #include <stdio.h> |
-
diff -r b193168bad98 src/lineNumbers.h
|
|
|
36 | 36 | #endif |
37 | 37 | |
38 | 38 | #ifndef INCL_QT_QFRAME |
39 | | #include <QtGui/QFrame> |
| 39 | #include <QFrame> |
40 | 40 | #define INCL_QT_QFRAME |
41 | 41 | #endif |
42 | 42 | |
-
diff -r b193168bad98 src/main.cpp
|
|
|
91 | 91 | } |
92 | 92 | } |
93 | 93 | catch ( const XxError& ex ) { |
94 | | std::cerr << ex.getMsg().toAscii().constData() << std::endl; |
| 94 | std::cerr << ex.getMsg().toLatin1().constData() << std::endl; |
95 | 95 | // Note: we're casting for Windows MSVC streams which are broken. |
96 | 96 | } |
97 | 97 | catch ( const std::exception& ex ) { |
-
diff -r b193168bad98 src/markers.cpp
|
|
|
26 | 26 | |
27 | 27 | #include <markers.h> |
28 | 28 | |
29 | | #include <QtGui/QFileDialog> |
30 | | #include <QtCore/QFileInfo> |
31 | | #include <QtCore/QString> |
32 | | #include <QtCore/QDir> |
| 29 | #include <QFileDialog> |
| 30 | #include <QFileInfo> |
| 31 | #include <QString> |
| 32 | #include <QDir> |
33 | 33 | |
34 | | #include <QtGui/QRadioButton> |
35 | | #include <QtGui/QLineEdit> |
36 | | #include <QtGui/QLabel> |
37 | | #include <QtGui/QCheckBox> |
| 34 | #include <QRadioButton> |
| 35 | #include <QLineEdit> |
| 36 | #include <QLabel> |
| 37 | #include <QCheckBox> |
38 | 38 | |
39 | | #include <QtGui/QLayout> |
40 | | #include <QtGui/QPushButton> |
41 | | #include <QtGui/QHBoxLayout> |
42 | | #include <QtGui/QVBoxLayout> |
| 39 | #include <QLayout> |
| 40 | #include <QPushButton> |
| 41 | #include <QHBoxLayout> |
| 42 | #include <QVBoxLayout> |
43 | 43 | |
44 | 44 | XX_NAMESPACE_BEGIN |
45 | 45 | |
… |
… |
|
167 | 167 | |
168 | 168 | _buttonOk = new QPushButton; |
169 | 169 | _buttonOk->setText( trUtf8( "Ok" ) ); |
170 | | _buttonOk->setDefault( TRUE ); |
| 170 | _buttonOk->setDefault( true ); |
171 | 171 | hlayout->addWidget( _buttonOk ); |
172 | 172 | hlayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); |
173 | 173 | |
… |
… |
|
253 | 253 | |
254 | 254 | // Hack to embed XxMarkersWidget into the QFileDialog, since the |
255 | 255 | // convenient Qt3 addWidgets doesn't exist anymore |
256 | | QVBoxLayout *l = qFindChild<QVBoxLayout*>(this); |
| 256 | QVBoxLayout *l = this->findChild<QVBoxLayout*>(); //qFindChild<QVBoxLayout*>(this); |
257 | 257 | Q_ASSERT(l); |
258 | 258 | _markersWidget = new XxMarkersWidget( threeWay ); |
259 | 259 | l->addWidget(_markersWidget); |
… |
… |
|
272 | 272 | ) |
273 | 273 | { |
274 | 274 | XxMarkersFileDialog* dlg = new XxMarkersFileDialog( |
275 | | startWith, filter, TRUE, threeWay, parent |
| 275 | startWith, filter, true, threeWay, parent |
276 | 276 | ); |
277 | 277 | |
278 | 278 | QString result; |
-
diff -r b193168bad98 src/markers.h
|
|
|
37 | 37 | #endif |
38 | 38 | |
39 | 39 | #ifndef INCL_STD_QFILEDIALOG |
40 | | #include <QtGui/QFileDialog> |
| 40 | #include <QFileDialog> |
41 | 41 | #define INCL_STD_QFILEDIALOG |
42 | 42 | #endif |
43 | 43 | |
-
diff -r b193168bad98 src/merged.cpp
|
|
|
31 | 31 | #include <diffs.h> |
32 | 32 | #include <buffer.h> |
33 | 33 | |
34 | | #include <QtGui/QPainter> |
35 | | #include <QtGui/QBrush> |
36 | | #include <QtGui/QPen> |
37 | | #include <QtGui/QColor> |
38 | | #include <QtGui/QMenu> |
39 | | #include <QtGui/QMenuBar> |
40 | | #include <QtGui/QLayout> |
41 | | #include <QtGui/QCloseEvent> |
| 34 | #include <QPainter> |
| 35 | #include <QBrush> |
| 36 | #include <QPen> |
| 37 | #include <QColor> |
| 38 | #include <QMenu> |
| 39 | #include <QMenuBar> |
| 40 | #include <QLayout> |
| 41 | #include <QCloseEvent> |
42 | 42 | |
43 | | #include <QtGui/QApplication> |
44 | | #include <QtGui/QClipboard> |
45 | | #include <QtGui/QHBoxLayout> |
46 | | #include <QtGui/QVBoxLayout> |
| 43 | #include <QApplication> |
| 44 | #include <QClipboard> |
| 45 | #include <QHBoxLayout> |
| 46 | #include <QVBoxLayout> |
47 | 47 | |
48 | 48 | #include <math.h> |
49 | 49 | #include <stdio.h> |
-
diff -r b193168bad98 src/merged.h
|
|
|
44 | 44 | #endif |
45 | 45 | |
46 | 46 | #ifndef INCL_QT_QMAINWINDOW |
47 | | #include <QtGui/QMainWindow> |
| 47 | #include <QMainWindow> |
48 | 48 | #define INCL_QT_QMAINWINDOW |
49 | 49 | #endif |
50 | 50 | |
51 | 51 | #ifndef INCL_QT_QFRAME |
52 | | #include <QtGui/QFrame> |
| 52 | #include <QFrame> |
53 | 53 | #define INCL_QT_QFRAME |
54 | 54 | #endif |
55 | 55 | |
56 | 56 | #ifndef INCL_QT_QWIDGET |
57 | | #include <QtGui/QWidget> |
| 57 | #include <QWidget> |
58 | 58 | #define INCL_QT_QWIDGET |
59 | 59 | #endif |
60 | 60 | |
-
diff -r b193168bad98 src/optionsDialog.cpp
|
|
|
32 | 32 | |
33 | 33 | #include <kdeSupport.h> |
34 | 34 | |
35 | | #include <QtGui/QTabWidget> |
36 | | #include <QtGui/QTextEdit> |
37 | | #include <QtGui/QLineEdit> |
38 | | #include <QtGui/QCheckBox> |
39 | | #include <QtGui/QRadioButton> |
40 | | #include <QtGui/QPushButton> |
41 | | #include <QtGui/QSpinBox> |
42 | | #include <QtGui/QListWidgetItem> |
43 | | #include <QtGui/QListWidget> |
44 | | #include <QtGui/QColor> |
45 | | #include <QtGui/QColorDialog> |
46 | | #include <QtGui/QFontDialog> |
47 | | #include <QtGui/QLabel> |
48 | | #include <QtGui/QComboBox> |
49 | | #include <QtCore/QString> |
50 | | #include <QtGui/QPainter> |
51 | | #include <QtCore/QMetaType> |
52 | | #include <QtGui/QItemDelegate> |
| 35 | #include <QTabWidget> |
| 36 | #include <QTextEdit> |
| 37 | #include <QLineEdit> |
| 38 | #include <QCheckBox> |
| 39 | #include <QRadioButton> |
| 40 | #include <QPushButton> |
| 41 | #include <QSpinBox> |
| 42 | #include <QListWidgetItem> |
| 43 | #include <QListWidget> |
| 44 | #include <QColor> |
| 45 | #include <QColorDialog> |
| 46 | #include <QFontDialog> |
| 47 | #include <QLabel> |
| 48 | #include <QComboBox> |
| 49 | #include <QString> |
| 50 | #include <QPainter> |
| 51 | #include <QMetaType> |
| 52 | #include <QItemDelegate> |
53 | 53 | |
54 | 54 | #include <stdlib.h> |
55 | 55 | |
… |
… |
|
153 | 153 | { |
154 | 154 | } |
155 | 155 | |
| 156 | // copied from Qt 4.8's qvariant.h: |
| 157 | // template<typename T> inline T qvariant_cast(const QVariant &variant) |
| 158 | // { |
| 159 | // return qvariant_cast<T>(variant); |
| 160 | // } |
| 161 | |
156 | 162 | //------------------------------------------------------------------------------ |
157 | 163 | // |
158 | 164 | inline XxColor XxColoredItem::color() const |
159 | 165 | { |
160 | | return qVariantValue<XxColoredItemData>( data( Qt::DisplayRole ) )._color; |
| 166 | return qvariant_cast<XxColoredItemData>( data( Qt::DisplayRole ) )._color; |
161 | 167 | } |
162 | 168 | |
163 | 169 | //------------------------------------------------------------------------------ |
164 | 170 | // |
165 | 171 | inline QColor XxColoredItem::foreColor() const |
166 | 172 | { |
167 | | return qVariantValue<XxColoredItemData>( data( Qt::DisplayRole ) )._foreColor; |
| 173 | return qvariant_cast<XxColoredItemData>( data( Qt::DisplayRole ) )._foreColor; |
168 | 174 | } |
169 | 175 | |
170 | 176 | //------------------------------------------------------------------------------ |
171 | 177 | // |
172 | 178 | inline QColor XxColoredItem::backColor() const |
173 | 179 | { |
174 | | return qVariantValue<XxColoredItemData>( data( Qt::DisplayRole ) )._backColor; |
| 180 | return qvariant_cast<XxColoredItemData>( data( Qt::DisplayRole ) )._backColor; |
175 | 181 | } |
176 | 182 | |
177 | 183 | //------------------------------------------------------------------------------ |
178 | 184 | // |
179 | 185 | inline bool XxColoredItem::modified() const |
180 | 186 | { |
181 | | return qVariantValue<XxColoredItemData>( data( Qt::DisplayRole ) )._modified; |
| 187 | return qvariant_cast<XxColoredItemData>( data( Qt::DisplayRole ) )._modified; |
182 | 188 | } |
183 | 189 | |
184 | 190 | //------------------------------------------------------------------------------ |
185 | 191 | // |
186 | 192 | void XxColoredItem::setForeColor( const QColor& color) |
187 | 193 | { |
188 | | XxColoredItemData data = qVariantValue<XxColoredItemData>( this->data( Qt::DisplayRole ) ); |
| 194 | XxColoredItemData data = qvariant_cast<XxColoredItemData>( this->data( Qt::DisplayRole ) ); |
189 | 195 | data._foreColor = color; |
190 | 196 | setData( Qt::DisplayRole, qVariantFromValue( data ) ); |
191 | 197 | } |
… |
… |
|
194 | 200 | // |
195 | 201 | void XxColoredItem::setBackColor( const QColor& color) |
196 | 202 | { |
197 | | XxColoredItemData data = qVariantValue<XxColoredItemData>( this->data( Qt::DisplayRole ) ); |
| 203 | XxColoredItemData data = qvariant_cast<XxColoredItemData>( this->data( Qt::DisplayRole ) ); |
198 | 204 | data._backColor = color; |
199 | 205 | setData( Qt::DisplayRole, qVariantFromValue( data ) ); |
200 | 206 | } |
… |
… |
|
203 | 209 | // |
204 | 210 | void XxColoredItem::setModified( const bool modified ) |
205 | 211 | { |
206 | | XxColoredItemData data = qVariantValue<XxColoredItemData>( this->data( Qt::DisplayRole ) ); |
| 212 | XxColoredItemData data = qvariant_cast<XxColoredItemData>( this->data( Qt::DisplayRole ) ); |
207 | 213 | data._modified = modified; |
208 | 214 | setData( Qt::DisplayRole, qVariantFromValue( data ) ); |
209 | 215 | } |
… |
… |
|
260 | 266 | { |
261 | 267 | painter->save(); |
262 | 268 | |
263 | | XxColoredItemData data = qVariantValue<XxColoredItemData>(index.data()); |
| 269 | XxColoredItemData data = qvariant_cast<XxColoredItemData>(index.data()); |
264 | 270 | |
265 | 271 | // Font. |
266 | 272 | painter->setFont( _resources->getFontText() ); |
-
diff -r b193168bad98 src/overview.cpp
|
|
|
30 | 30 | #include <diffs.h> |
31 | 31 | #include <buffer.h> |
32 | 32 | |
33 | | #include <QtGui/QPainter> |
34 | | #include <QtGui/QBrush> |
35 | | #include <QtGui/QPen> |
36 | | #include <QtGui/QColor> |
37 | | #include <QtGui/QWheelEvent> |
38 | | #include <QtGui/QResizeEvent> |
39 | | #include <QtGui/QFrame> |
40 | | #include <QtGui/QMouseEvent> |
| 33 | #include <QPainter> |
| 34 | #include <QBrush> |
| 35 | #include <QPen> |
| 36 | #include <QColor> |
| 37 | #include <QWheelEvent> |
| 38 | #include <QResizeEvent> |
| 39 | #include <QFrame> |
| 40 | #include <QMouseEvent> |
41 | 41 | |
42 | 42 | #include <math.h> |
43 | 43 | |
-
diff -r b193168bad98 src/overview.h
|
|
|
36 | 36 | #endif |
37 | 37 | |
38 | 38 | #ifndef INCL_QT_QFRAME |
39 | | #include <QtGui/QFrame> |
| 39 | #include <QFrame> |
40 | 40 | #define INCL_QT_QFRAME |
41 | 41 | #endif |
42 | 42 | |
-
diff -r b193168bad98 src/resParser.cpp
|
|
|
43 | 43 | |
44 | 44 | #include <kdeSupport.h> |
45 | 45 | |
46 | | #include <QtGui/QKeySequence> |
47 | | #include <QtGui/QApplication> |
48 | | #include <QtGui/QFont> |
49 | | #include <QtCore/QFile> |
50 | | #include <QtCore/QFileInfo> |
51 | | #include <QtCore/QByteArray> |
52 | | #include <QtCore/QString> |
53 | | #include <QtGui/QStyleFactory> |
54 | | #include <QtGui/QDesktopWidget> |
55 | | #include <QtCore/QTextStream> |
| 46 | #include <QKeySequence> |
| 47 | #include <QApplication> |
| 48 | #include <QFont> |
| 49 | #include <QFile> |
| 50 | #include <QFileInfo> |
| 51 | #include <QByteArray> |
| 52 | #include <QString> |
| 53 | #include <QStyleFactory> |
| 54 | #include <QDesktopWidget> |
| 55 | #include <QTextStream> |
56 | 56 | |
57 | 57 | #include <stdexcept> |
58 | 58 | #include <iostream> |
-
diff -r b193168bad98 src/resParser.h
|
|
|
36 | 36 | #endif |
37 | 37 | |
38 | 38 | #ifndef INCL_QT_QSTRING |
39 | | #include <QtCore/QString> |
| 39 | #include <QString> |
40 | 40 | #define INCL_QT_QSTRING |
41 | 41 | #endif |
42 | 42 | |
43 | 43 | #ifndef INCL_QT_QTEXTSTREAM |
44 | | #include <QtCore/QTextStream> |
| 44 | #include <QTextStream> |
45 | 45 | #define INCL_QT_QTEXTSTREAM |
46 | 46 | #endif |
47 | 47 | |
-
diff -r b193168bad98 src/resParser.y
|
|
|
28 | 28 | #include <resParser.h> |
29 | 29 | |
30 | 30 | // Qt imports |
31 | | #include <QtCore/QString> |
32 | | #include <QtCore/QStringList> |
33 | | #include <QtCore/QRect> |
34 | | #include <QtGui/QStyleFactory> |
| 31 | #include <QString> |
| 32 | #include <QStringList> |
| 33 | #include <QRect> |
| 34 | #include <QStyleFactory> |
35 | 35 | |
36 | 36 | // The parser input is the resources object to fill in. |
37 | 37 | #define RESOURCES ( static_cast<XxResources*>(resources) ) |
-
diff -r b193168bad98 src/resources.cpp
|
|
|
31 | 31 | #include <exceptions.h> |
32 | 32 | #include <util.h> |
33 | 33 | |
34 | | #include <QtGui/QColor> |
35 | | #include <QtCore/QObject> |
36 | | #include <QtGui/QApplication> // to get desktop |
37 | | #include <QtCore/QRegExp> |
38 | | #include <QtGui/QStyleFactory> |
| 34 | #include <QColor> |
| 35 | #include <QObject> |
| 36 | #include <QApplication> // to get desktop |
| 37 | #include <QRegExp> |
| 38 | #include <QStyleFactory> |
39 | 39 | |
40 | 40 | #include <iostream> |
41 | 41 | #include <string.h> // ::strcmp |
-
diff -r b193168bad98 src/resources.h
|
|
|
32 | 32 | #endif |
33 | 33 | |
34 | 34 | #ifndef INCL_QT_QOBJECT |
35 | | #include <QtCore/QObject> |
| 35 | #include <QObject> |
36 | 36 | #define INCL_QT_QOBJECT |
37 | 37 | #endif |
38 | 38 | |
39 | 39 | #ifndef INCL_QT_QCOLOR |
40 | | #include <QtGui/QColor> |
| 40 | #include <QColor> |
41 | 41 | #define INCL_QT_QCOLOR |
42 | 42 | #endif |
43 | 43 | |
44 | 44 | #ifndef INCL_QT_QFONT |
45 | | #include <QtGui/QFont> |
| 45 | #include <QFont> |
46 | 46 | #define INCL_QT_QFONT |
47 | 47 | #endif |
48 | 48 | |
49 | 49 | #ifndef INCL_QT_QRECT |
50 | | #include <QtCore/QRect> |
| 50 | #include <QRect> |
51 | 51 | #define INCL_QT_QFONT |
52 | 52 | #endif |
53 | 53 | |
-
diff -r b193168bad98 src/scrollView.cpp
|
|
|
27 | 27 | #include <scrollView.h> |
28 | 28 | #include <app.h> |
29 | 29 | |
30 | | #include <QtGui/QScrollBar> |
31 | | #include <QtCore/QSize> |
32 | | #include <QtGui/QFont> |
33 | | #include <QtGui/QFontMetrics> |
34 | | #include <QtGui/QWheelEvent> |
| 30 | #include <QScrollBar> |
| 31 | #include <QSize> |
| 32 | #include <QFont> |
| 33 | #include <QFontMetrics> |
| 34 | #include <QWheelEvent> |
35 | 35 | |
36 | 36 | XX_NAMESPACE_BEGIN |
37 | 37 | |
-
diff -r b193168bad98 src/scrollView.h
|
|
|
36 | 36 | #endif |
37 | 37 | |
38 | 38 | #ifndef INCL_QT_QWIDGET |
39 | | #include <QtGui/QWidget> |
| 39 | #include <QWidget> |
40 | 40 | #define INCL_QT_QWIDGET |
41 | 41 | #endif |
42 | 42 | |
-
diff -r b193168bad98 src/searchDialog.cpp
|
|
|
29 | 29 | #include <diffs.h> |
30 | 30 | #include <app.h> |
31 | 31 | |
32 | | #include <QtGui/QLineEdit> |
33 | | #include <QtGui/QPushButton> |
34 | | #include <QtGui/QComboBox> |
| 32 | #include <QLineEdit> |
| 33 | #include <QPushButton> |
| 34 | #include <QComboBox> |
35 | 35 | |
36 | 36 | XX_NAMESPACE_BEGIN |
37 | 37 | |
-
diff -r b193168bad98 src/suicideMessageBox.h
|
|
|
32 | 32 | #endif |
33 | 33 | |
34 | 34 | #ifndef INCL_QT_QMESSAGEBOX |
35 | | #include <QtGui/QMessageBox> |
| 35 | #include <QMessageBox> |
36 | 36 | #define INCL_QT_QMESSAGEBOX |
37 | 37 | #endif |
38 | 38 | |
-
diff -r b193168bad98 src/text.cpp
|
|
|
33 | 33 | |
34 | 34 | #include <kdeSupport.h> |
35 | 35 | |
36 | | #include <QtGui/QPainter> |
37 | | #include <QtGui/QBrush> |
38 | | #include <QtGui/QPen> |
39 | | #include <QtGui/QColor> |
40 | | #include <QtGui/QMenu> |
| 36 | #include <QPainter> |
| 37 | #include <QBrush> |
| 38 | #include <QPen> |
| 39 | #include <QColor> |
| 40 | #include <QMenu> |
41 | 41 | |
42 | | #include <QtGui/QApplication> |
43 | | #include <QtGui/QClipboard> |
44 | | #include <QtGui/QFrame> |
45 | | #include <QtGui/QResizeEvent> |
46 | | #include <QtGui/QMouseEvent> |
47 | | #include <QtGui/QWheelEvent> |
| 42 | #include <QApplication> |
| 43 | #include <QClipboard> |
| 44 | #include <QFrame> |
| 45 | #include <QResizeEvent> |
| 46 | #include <QMouseEvent> |
| 47 | #include <QWheelEvent> |
48 | 48 | |
49 | 49 | #include <math.h> |
50 | 50 | #include <stdio.h> |
-
diff -r b193168bad98 src/text.h
|
|
|
36 | 36 | #endif |
37 | 37 | |
38 | 38 | #ifndef INCL_QT_QFRAME |
39 | | #include <QtGui/QFrame> |
| 39 | #include <QFrame> |
40 | 40 | #define INCL_QT_QFRAME |
41 | 41 | #endif |
42 | 42 | |
43 | 43 | #ifndef INCL_QT_QFONTMETRICS |
44 | | #include <QtGui/QFontMetrics> |
| 44 | #include <QFontMetrics> |
45 | 45 | #define INCL_QT_QFONTMETRICS |
46 | 46 | #endif |
47 | 47 | |
-
diff -r b193168bad98 src/util.cpp
|
|
|
28 | 28 | #include <exceptions.h> |
29 | 29 | #include <main.h> |
30 | 30 | |
31 | | #include <QtCore/QString> |
32 | | #include <QtCore/QByteArray> |
33 | | #include <QtCore/QTextStream> |
34 | | #include <QtCore/QFileInfo> |
35 | | #include <QtCore/QRegExp> |
36 | | #include <QtCore/QDateTime> |
| 31 | #include <QString> |
| 32 | #include <QByteArray> |
| 33 | #include <QTextStream> |
| 34 | #include <QFileInfo> |
| 35 | #include <QRegExp> |
| 36 | #include <QDateTime> |
37 | 37 | |
38 | 38 | #include <iostream> |
39 | 39 | #include <sys/types.h> |
… |
… |
|
235 | 235 | case 'U': { // - User name of owner |
236 | 236 | strcat( pformat, "s" ); |
237 | 237 | QString tmp; |
238 | | tmp.sprintf( pformat,qfi.owner().toAscii().constData() ); |
| 238 | tmp.sprintf( pformat,qfi.owner().toLatin1().constData() ); |
239 | 239 | target.append( tmp ); |
240 | 240 | } break; |
241 | 241 | |
… |
… |
|
249 | 249 | case 'G': { // - Group name of owner |
250 | 250 | strcat( pformat, "s" ); |
251 | 251 | QString tmp; |
252 | | tmp.sprintf( pformat,qfi.group().toAscii().constData() ); |
| 252 | tmp.sprintf( pformat,qfi.group().toLatin1().constData() ); |
253 | 253 | target.append( tmp ); |
254 | 254 | } break; |
255 | 255 | |
… |
… |
|
280 | 280 | // It's not the exact same as stat( 2 ) does, but this is ISO 8601 |
281 | 281 | // and stat uses some weird syntax of it's own. |
282 | 282 | tmp.sprintf( pformat, |
283 | | qfi.lastRead().toString( DATEFORMAT ).toAscii().constData() ); |
| 283 | qfi.lastRead().toString( DATEFORMAT ).toLatin1().constData() ); |
284 | 284 | target.append( tmp ); |
285 | 285 | } break; |
286 | 286 | |
… |
… |
|
297 | 297 | // It's not the exact same as stat( 2 ) does, but this is ISO 8601 |
298 | 298 | // and stat uses some weird syntax of it's own. |
299 | 299 | tmp.sprintf( pformat, |
300 | | qfi.lastModified().toString( DATEFORMAT ).toAscii().constData() ); |
| 300 | qfi.lastModified().toString( DATEFORMAT ).toLatin1().constData() ); |
301 | 301 | target.append( tmp ); |
302 | 302 | } break; |
303 | 303 | |
… |
… |
|
383 | 383 | // and stat uses some weird syntax of it's own. |
384 | 384 | tmp.sprintf( |
385 | 385 | pformat, |
386 | | ( QDateTime::currentDateTime() ).toString( DATEFORMAT ).toAscii().constData() |
| 386 | ( QDateTime::currentDateTime() ).toString( DATEFORMAT ).toLatin1().constData() |
387 | 387 | ); |
388 | 388 | target.append( tmp ); |
389 | 389 | } break; |
… |
… |
|
403 | 403 | // and stat uses some weird syntax of it's own. |
404 | 404 | tmp.sprintf( |
405 | 405 | pformat, |
406 | | ( QDateTime::currentDateTime() ).toString( DATEFORMAT ).toAscii().constData() ); |
| 406 | ( QDateTime::currentDateTime() ).toString( DATEFORMAT ).toLatin1().constData() ); |
407 | 407 | target.append( tmp ); |
408 | 408 | } break; |
409 | 409 | |
… |
… |
|
793 | 793 | break; |
794 | 794 | // use at() in case found+1 is past the end of the string |
795 | 795 | QChar escapedChar = newFormat.at( found+1 ); |
796 | | switch( escapedChar.toAscii() ) { |
| 796 | switch( escapedChar.toLatin1() ) { |
797 | 797 | case 'n': |
798 | 798 | newFormat = newFormat.replace( found, 2, QChar( '\n' ) ); |
799 | 799 | break; |
-
diff -r b193168bad98 src/util.h
|
|
|
32 | 32 | #endif |
33 | 33 | |
34 | 34 | #ifndef INCL_QT_QSTRING |
35 | | #include <QtCore/QString> |
| 35 | #include <QString> |
36 | 36 | #define INCL_QT_QSTRING |
37 | 37 | #endif |
38 | 38 | |
39 | 39 | #ifndef INCL_QT_QFILEINFO |
40 | | #include <QtCore/QFileInfo> |
| 40 | #include <QFileInfo> |
41 | 41 | #define INCL_QT_QFILEINFO |
42 | 42 | #endif |
43 | 43 | |
44 | 44 | #ifndef INCL_QT_QSTRINGLIST |
45 | | #include <QtCore/QStringList> |
| 45 | #include <QStringList> |
46 | 46 | #define INCL_QT_QSTRINGLIST |
47 | 47 | #endif |
48 | 48 | |