Diffstat (limited to 'noncore/apps/opie-reader/QTReaderApp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/QTReaderApp.cpp | 279 |
1 files changed, 140 insertions, 139 deletions
diff --git a/noncore/apps/opie-reader/QTReaderApp.cpp b/noncore/apps/opie-reader/QTReaderApp.cpp index b072854..f18cb59 100644 --- a/noncore/apps/opie-reader/QTReaderApp.cpp +++ b/noncore/apps/opie-reader/QTReaderApp.cpp | |||
@@ -18,18 +18,46 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | |||
20 | #include "useqpe.h" | 21 | #include "useqpe.h" |
21 | #include <qregexp.h> | 22 | #include "QTReader.h" |
22 | #include <qclipboard.h> | 23 | #include "GraphicWin.h" |
23 | #include <qwidgetstack.h> | 24 | #include "Bkmks.h" |
25 | #include "cbkmkselector.h" | ||
26 | #include "infowin.h" | ||
27 | #include "ToolbarPrefs.h" | ||
28 | #include "Prefs.h" | ||
29 | #include "CAnnoEdit.h" | ||
30 | #include "QFloatBar.h" | ||
31 | #include "FixedFont.h" | ||
32 | #include "URLDialog.h" | ||
33 | #include "QTReaderApp.h" | ||
34 | #include "CDrawBuffer.h" | ||
35 | #include "Filedata.h" | ||
36 | #include "opie.h" | ||
37 | #include "names.h" | ||
38 | #include "CEncoding_tables.h" | ||
39 | #include "CloseDialog.h" | ||
40 | |||
41 | /* OPIE */ | ||
42 | #include <opie2/odebug.h> | ||
43 | #ifdef USEQPE | ||
44 | #include <qpe/menubutton.h> | ||
45 | #include <qpe/fontdatabase.h> | ||
46 | #include <qpe/global.h> | ||
47 | #include <qpe/applnk.h> | ||
48 | #include <qpe/config.h> | ||
49 | #include <qpe/qcopenvelope_qws.h> | ||
50 | #endif | ||
51 | |||
52 | /* QT */ | ||
24 | #ifdef USEQPE | 53 | #ifdef USEQPE |
25 | #include <qmenubar.h> | 54 | #include <qmenubar.h> |
26 | #include <qtoolbar.h> | 55 | #include <qtoolbar.h> |
27 | #endif | 56 | #endif |
57 | #include <qregexp.h> | ||
58 | #include <qclipboard.h> | ||
59 | #include <qwidgetstack.h> | ||
28 | #include <qmenubar.h> | 60 | #include <qmenubar.h> |
29 | #include <qtoolbar.h> | 61 | #include <qtoolbar.h> |
30 | #ifdef USEQPE | ||
31 | #include <qpe/menubutton.h> | ||
32 | #include <qpe/fontdatabase.h> | ||
33 | #endif | ||
34 | #include <qcombobox.h> | 62 | #include <qcombobox.h> |
35 | #include <qpopupmenu.h> | 63 | #include <qpopupmenu.h> |
@@ -40,31 +68,12 @@ | |||
40 | #include <qspinbox.h> | 68 | #include <qspinbox.h> |
41 | #include <qobjectlist.h> | 69 | #include <qobjectlist.h> |
42 | #ifdef USEQPE | ||
43 | #include <qpe/global.h> | ||
44 | #include <qpe/applnk.h> | ||
45 | #endif | ||
46 | #include <qfileinfo.h> | 70 | #include <qfileinfo.h> |
47 | #include <stdlib.h> //getenv | ||
48 | #include <qprogressbar.h> | 71 | #include <qprogressbar.h> |
49 | #ifdef USEQPE | ||
50 | #include <qpe/config.h> | ||
51 | #endif | ||
52 | #include <qbuttongroup.h> | 72 | #include <qbuttongroup.h> |
53 | #include <qradiobutton.h> | 73 | #include <qradiobutton.h> |
54 | #ifdef USEQPE | 74 | |
55 | #include <qpe/qcopenvelope_qws.h> | 75 | /* STD */ |
56 | #endif | 76 | #include <stdlib.h> //getenv |
57 | #include "QTReader.h" | 77 | |
58 | #include "GraphicWin.h" | ||
59 | #include "Bkmks.h" | ||
60 | #include "cbkmkselector.h" | ||
61 | #include "infowin.h" | ||
62 | #include "ToolbarPrefs.h" | ||
63 | #include "Prefs.h" | ||
64 | #include "CAnnoEdit.h" | ||
65 | #include "QFloatBar.h" | ||
66 | #include "FixedFont.h" | ||
67 | #include "URLDialog.h" | ||
68 | //#include <qpe/fontdatabase.h> | ||
69 | 78 | ||
70 | #ifdef USEQPE | 79 | #ifdef USEQPE |
@@ -76,12 +85,4 @@ | |||
76 | #endif | 85 | #endif |
77 | 86 | ||
78 | #include "QTReaderApp.h" | ||
79 | #include "CDrawBuffer.h" | ||
80 | #include "Filedata.h" | ||
81 | #include "opie.h" | ||
82 | #include "names.h" | ||
83 | #include "CEncoding_tables.h" | ||
84 | #include "CloseDialog.h" | ||
85 | |||
86 | bool CheckVersion(int&, int&, char&); | 87 | bool CheckVersion(int&, int&, char&); |
87 | 88 | ||
@@ -126,5 +127,5 @@ void QTReaderApp::listBkmkFiles() | |||
126 | QDir d = QDir::home(); // "/" | 127 | QDir d = QDir::home(); // "/" |
127 | if ( !d.cd(APPDIR) ) { // "/tmp" | 128 | if ( !d.cd(APPDIR) ) { // "/tmp" |
128 | qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); | 129 | owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; |
129 | d = QDir::home(); | 130 | d = QDir::home(); |
130 | d.mkdir(APPDIR); | 131 | d.mkdir(APPDIR); |
@@ -147,5 +148,5 @@ void QTReaderApp::listBkmkFiles() | |||
147 | cnt++; | 148 | cnt++; |
148 | 149 | ||
149 | //qDebug( "%10li %s", fi->size(), fi->fileName().data() ); | 150 | //odebug << "" << fi->size() << " " << fi->fileName().data() << "" << oendl; |
150 | ++it; // goto next list element | 151 | ++it; // goto next list element |
151 | } | 152 | } |
@@ -215,6 +216,6 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
215 | m_url_globalfile = false; | 216 | m_url_globalfile = false; |
216 | ftime(&m_lastkeytime); | 217 | ftime(&m_lastkeytime); |
217 | //// qDebug("Application directory = %s", (const tchar *)QPEApplication::documentDir()); | 218 | //// odebug << "Application directory = " << (const tchar *)QPEApplication::documentDir() << "" << oendl; |
218 | //// qDebug("Application directory = %s", (const tchar *)Global::applicationFileName("uqtreader","bkmks.xml")); | 219 | //// odebug << "Application directory = " << (const tchar *)Global::applicationFileName("uqtreader" << "" << oendl; |
219 | 220 | ||
220 | m_bcloseDisabled = true; | 221 | m_bcloseDisabled = true; |
@@ -244,5 +245,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
244 | } | 245 | } |
245 | 246 | ||
246 | // qDebug("Initial Rotation(%d):%s", m_rot, (const char*)rot); | 247 | // odebug << "Initial Rotation(" << m_rot << "):" << rot << "" << oendl; |
247 | */ | 248 | */ |
248 | m_autogenstr = "^ *[A-Z].*[a-z] *$"; | 249 | m_autogenstr = "^ *[A-Z].*[a-z] *$"; |
@@ -261,5 +262,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
261 | QDir d = QDir::home(); // "/" | 262 | QDir d = QDir::home(); // "/" |
262 | if ( !d.cd(APPDIR) ) { // "/tmp" | 263 | if ( !d.cd(APPDIR) ) { // "/tmp" |
263 | qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); | 264 | owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; |
264 | d = QDir::home(); | 265 | d = QDir::home(); |
265 | d.mkdir(APPDIR); | 266 | d.mkdir(APPDIR); |
@@ -267,5 +268,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
267 | } | 268 | } |
268 | QFileInfo fi(d, INIFILE); | 269 | QFileInfo fi(d, INIFILE); |
269 | // qDebug("Path:%s", (const char*)fi.absFilePath()); | 270 | // odebug << "Path:" << fi.absFilePath() << "" << oendl; |
270 | Config config(fi.absFilePath()); | 271 | Config config(fi.absFilePath()); |
271 | #endif | 272 | #endif |
@@ -357,5 +358,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
357 | importSelector->setCloseVisible( FALSE ); | 358 | importSelector->setCloseVisible( FALSE ); |
358 | */ | 359 | */ |
359 | // qDebug("Reading file list"); | 360 | // odebug << "Reading file list" << oendl; |
360 | readfilelist(); | 361 | readfilelist(); |
361 | 362 | ||
@@ -368,5 +369,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
368 | #endif | 369 | #endif |
369 | 370 | ||
370 | // qDebug("Reading config"); | 371 | // odebug << "Reading config" << oendl; |
371 | // Config config( APPDIR ); | 372 | // Config config( APPDIR ); |
372 | config.setGroup( "View" ); | 373 | config.setGroup( "View" ); |
@@ -770,5 +771,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
770 | m_fontBar->setHorizontalStretchable( TRUE ); | 771 | m_fontBar->setHorizontalStretchable( TRUE ); |
771 | 772 | ||
772 | // qDebug("Font selector"); | 773 | // odebug << "Font selector" << oendl; |
773 | m_fontSelector = new QComboBox(false, m_fontBar); | 774 | m_fontSelector = new QComboBox(false, m_fontBar); |
774 | m_fontBar->setStretchableWidget( m_fontSelector ); | 775 | m_fontBar->setStretchableWidget( m_fontSelector ); |
@@ -802,15 +803,15 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
802 | this, SLOT( msgHandler(const QCString&,const QByteArray&) ) ); | 803 | this, SLOT( msgHandler(const QCString&,const QByteArray&) ) ); |
803 | #endif | 804 | #endif |
804 | // qDebug("Initing"); | 805 | // odebug << "Initing" << oendl; |
805 | reader->init(); | 806 | reader->init(); |
806 | // qDebug("Inited"); | 807 | // odebug << "Inited" << oendl; |
807 | // m_buttonAction[m_spaceTarget]->setOn(true); | 808 | // m_buttonAction[m_spaceTarget]->setOn(true); |
808 | // qDebug("fonting"); | 809 | // odebug << "fonting" << oendl; |
809 | do_setfont(reader->m_fontname); | 810 | do_setfont(reader->m_fontname); |
810 | if (!reader->m_lastfile.isEmpty()) | 811 | if (!reader->m_lastfile.isEmpty()) |
811 | { | 812 | { |
812 | //qDebug("doclnk"); | 813 | // odebug << "doclnk" << oendl; |
813 | //doc = new DocLnk(reader->m_lastfile); | 814 | //doc = new DocLnk(reader->m_lastfile); |
814 | //qDebug("doclnk done"); | 815 | // odebug << "doclnk done" << oendl; |
815 | if (pOpenlist != NULL) | 816 | if (pOpenlist != NULL) |
816 | { | 817 | { |
@@ -832,10 +833,10 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
832 | break; | 833 | break; |
833 | } | 834 | } |
834 | // qDebug("Item:%s", (const char*)toQString(CFiledata(p->anno()).name())); | 835 | // odebug << "Item:" << toQString(CFiledata(p->anno()).name()) << "" << oendl; |
835 | p = NULL; | 836 | p = NULL; |
836 | } | 837 | } |
837 | if (p != NULL) | 838 | if (p != NULL) |
838 | { | 839 | { |
839 | //qDebug("openfrombkmk"); | 840 | // odebug << "openfrombkmk" << oendl; |
840 | if (!openfrombkmk(p)) | 841 | if (!openfrombkmk(p)) |
841 | showEditTools(); | 842 | showEditTools(); |
@@ -843,5 +844,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
843 | else | 844 | else |
844 | { | 845 | { |
845 | //qDebug("openfile"); | 846 | // odebug << "openfile" << oendl; |
846 | openFile( reader->m_lastfile ); | 847 | openFile( reader->m_lastfile ); |
847 | } | 848 | } |
@@ -849,5 +850,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
849 | else | 850 | else |
850 | { | 851 | { |
851 | // qDebug("Openfile 2"); | 852 | // odebug << "Openfile 2" << oendl; |
852 | if (!reader->m_lastfile.isEmpty()) | 853 | if (!reader->m_lastfile.isEmpty()) |
853 | openFile( reader->m_lastfile ); | 854 | openFile( reader->m_lastfile ); |
@@ -871,5 +872,5 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
871 | config.writeEntry("Minor", (int)minor); | 872 | config.writeEntry("Minor", (int)minor); |
872 | } | 873 | } |
873 | // qDebug("finished update"); | 874 | // odebug << "finished update" << oendl; |
874 | } | 875 | } |
875 | 876 | ||
@@ -1029,12 +1030,12 @@ QToolBar* QTReaderApp::filebar() | |||
1029 | { | 1030 | { |
1030 | case cesSingle: | 1031 | case cesSingle: |
1031 | // qDebug("Setting filebar to menubar"); | 1032 | // odebug << "Setting filebar to menubar" << oendl; |
1032 | fileBar = menubar; | 1033 | fileBar = menubar; |
1033 | break; | 1034 | break; |
1034 | default: | 1035 | default: |
1035 | qDebug("Incorrect toolbar policy set"); | 1036 | odebug << "Incorrect toolbar policy set" << oendl; |
1036 | case cesMenuTool: | 1037 | case cesMenuTool: |
1037 | case cesMultiple: | 1038 | case cesMultiple: |
1038 | // qDebug("Creating new file bar"); | 1039 | // odebug << "Creating new file bar" << oendl; |
1039 | fileBar = new QToolBar("File", this, m_tbposition); | 1040 | fileBar = new QToolBar("File", this, m_tbposition); |
1040 | break; | 1041 | break; |
@@ -1054,5 +1055,5 @@ QToolBar* QTReaderApp::viewbar() | |||
1054 | break; | 1055 | break; |
1055 | default: | 1056 | default: |
1056 | qDebug("Incorrect toolbar policy set"); | 1057 | odebug << "Incorrect toolbar policy set" << oendl; |
1057 | case cesSingle: | 1058 | case cesSingle: |
1058 | case cesMenuTool: | 1059 | case cesMenuTool: |
@@ -1070,13 +1071,13 @@ QToolBar* QTReaderApp::navbar() | |||
1070 | { | 1071 | { |
1071 | case cesMultiple: | 1072 | case cesMultiple: |
1072 | // qDebug("Creating new nav bar"); | 1073 | // odebug << "Creating new nav bar" << oendl; |
1073 | navBar = new QToolBar("Navigation", this, m_tbposition); | 1074 | navBar = new QToolBar("Navigation", this, m_tbposition); |
1074 | break; | 1075 | break; |
1075 | default: | 1076 | default: |
1076 | qDebug("Incorrect toolbar policy set"); | 1077 | odebug << "Incorrect toolbar policy set" << oendl; |
1077 | case cesSingle: | 1078 | case cesSingle: |
1078 | case cesMenuTool: | 1079 | case cesMenuTool: |
1079 | navBar = fileBar; | 1080 | navBar = fileBar; |
1080 | // qDebug("Setting navbar to filebar"); | 1081 | // odebug << "Setting navbar to filebar" << oendl; |
1081 | break; | 1082 | break; |
1082 | } | 1083 | } |
@@ -1094,5 +1095,5 @@ QToolBar* QTReaderApp::markbar() | |||
1094 | break; | 1095 | break; |
1095 | default: | 1096 | default: |
1096 | qDebug("Incorrect toolbar policy set"); | 1097 | odebug << "Incorrect toolbar policy set" << oendl; |
1097 | case cesSingle: | 1098 | case cesSingle: |
1098 | case cesMenuTool: | 1099 | case cesMenuTool: |
@@ -1128,5 +1129,5 @@ void QTReaderApp::msgHandler(const QCString& _msg, const QByteArray& _data) | |||
1128 | QString msg = QString::fromUtf8(_msg); | 1129 | QString msg = QString::fromUtf8(_msg); |
1129 | 1130 | ||
1130 | //// qDebug("Received:%s", (const char*)msg); | 1131 | //// odebug << "Received:" << msg << "" << oendl; |
1131 | 1132 | ||
1132 | QDataStream stream( _data, IO_ReadOnly ); | 1133 | QDataStream stream( _data, IO_ReadOnly ); |
@@ -1482,5 +1483,5 @@ void QTReaderApp::setfullscreen(bool sfs) | |||
1482 | void QTReaderApp::buttonActionSelected(QAction* _a) | 1483 | void QTReaderApp::buttonActionSelected(QAction* _a) |
1483 | { | 1484 | { |
1484 | //// qDebug("es:%x : %s (%u)", _a, (const char *)(_a->text()), ActNameToInt(_a->text())); | 1485 | //// odebug << "es:" << _a << " : " << (const char *)(_a->text()) << " (" << ActNameToInt(_a->text()) << ")" << oendl; |
1485 | m_spaceTarget = ActNameToInt(_a->text()); | 1486 | m_spaceTarget = ActNameToInt(_a->text()); |
1486 | } | 1487 | } |
@@ -1564,5 +1565,5 @@ void QTReaderApp::updatefileinfo() | |||
1564 | tchar* nm = fromQString(reader->m_string); | 1565 | tchar* nm = fromQString(reader->m_string); |
1565 | tchar* fl = fromQString(reader->m_lastfile); | 1566 | tchar* fl = fromQString(reader->m_lastfile); |
1566 | // qDebug("Lastfile:%x", fl); | 1567 | // odebug << "Lastfile:" << fl << "" << oendl; |
1567 | bool notadded = true; | 1568 | bool notadded = true; |
1568 | if (pOpenlist == NULL) pOpenlist = new CList<Bkmk>; | 1569 | if (pOpenlist == NULL) pOpenlist = new CList<Bkmk>; |
@@ -1578,5 +1579,5 @@ void QTReaderApp::updatefileinfo() | |||
1578 | CFiledata fd(iter->anno()); | 1579 | CFiledata fd(iter->anno()); |
1579 | reader->setSaveData(data, dlen, fd.content(), fd.length()); | 1580 | reader->setSaveData(data, dlen, fd.content(), fd.length()); |
1580 | // qDebug("Filedata(1):%u, %u", fd.length(), dlen); | 1581 | // odebug << "Filedata(1):" << fd.length() << ", " << dlen << "" << oendl; |
1581 | // getstate(data, dlen); | 1582 | // getstate(data, dlen); |
1582 | iter->setAnno(data, dlen); | 1583 | iter->setAnno(data, dlen); |
@@ -1587,5 +1588,5 @@ void QTReaderApp::updatefileinfo() | |||
1587 | } | 1588 | } |
1588 | } | 1589 | } |
1589 | // qDebug("Added?:%x", notadded); | 1590 | // odebug << "Added?:" << notadded << "" << oendl; |
1590 | if (notadded) | 1591 | if (notadded) |
1591 | { | 1592 | { |
@@ -1597,5 +1598,5 @@ void QTReaderApp::updatefileinfo() | |||
1597 | reader->setSaveData(data, dlen, fd.content(), fd.length()); | 1598 | reader->setSaveData(data, dlen, fd.content(), fd.length()); |
1598 | pOpenlist->push_front(Bkmk(nm, data, dlen, reader->pagelocate())); | 1599 | pOpenlist->push_front(Bkmk(nm, data, dlen, reader->pagelocate())); |
1599 | //qDebug("Filedata(2):%u, %u", fd.length(), dlen); | 1600 | // odebug << "Filedata(2):" << fd.length() << ", " << dlen << "" << oendl; |
1600 | delete [] data; | 1601 | delete [] data; |
1601 | } | 1602 | } |
@@ -1612,5 +1613,5 @@ void QTReaderApp::fileOpen() | |||
1612 | if (searchVisible) searchBar->hide(); | 1613 | if (searchVisible) searchBar->hide(); |
1613 | */ | 1614 | */ |
1614 | // qDebug("fileOpen"); | 1615 | // odebug << "fileOpen" << oendl; |
1615 | // if (!reader->m_lastfile.isEmpty()) | 1616 | // if (!reader->m_lastfile.isEmpty()) |
1616 | updatefileinfo(); | 1617 | updatefileinfo(); |
@@ -1653,5 +1654,5 @@ void QTReaderApp::fileOpen2() | |||
1653 | } | 1654 | } |
1654 | // reader->refresh(); | 1655 | // reader->refresh(); |
1655 | // qDebug("HEIGHT:%d", reader->m_lastheight); | 1656 | // odebug << "HEIGHT:" << reader->m_lastheight << "" << oendl; |
1656 | } | 1657 | } |
1657 | 1658 | ||
@@ -1673,5 +1674,5 @@ QString QTReaderApp::usefilebrowser() | |||
1673 | fn = fb->getCurrentFile(); | 1674 | fn = fb->getCurrentFile(); |
1674 | } | 1675 | } |
1675 | // qDebug("Selected %s", (const char*)fn); | 1676 | // odebug << "Selected " << fn << "" << oendl; |
1676 | delete fb; | 1677 | delete fb; |
1677 | showEditTools(); | 1678 | showEditTools(); |
@@ -1804,5 +1805,5 @@ void QTReaderApp::showprefs() | |||
1804 | break; | 1805 | break; |
1805 | default: | 1806 | default: |
1806 | qDebug("Format out of range"); | 1807 | odebug << "Format out of range" << oendl; |
1807 | } | 1808 | } |
1808 | reader->bdepluck = prefwin->Depluck(); | 1809 | reader->bdepluck = prefwin->Depluck(); |
@@ -1864,5 +1865,5 @@ void QTReaderApp::showtoolbarprefs() | |||
1864 | if ( !d.cd(APPDIR) ) | 1865 | if ( !d.cd(APPDIR) ) |
1865 | { // "/tmp" | 1866 | { // "/tmp" |
1866 | qWarning( "Cannot find the \"~/%s\" directory", APPDIR ); | 1867 | owarn << "Cannot find the \"~/" << APPDIR << "\" directory" << oendl; |
1867 | d = QDir::home(); | 1868 | d = QDir::home(); |
1868 | d.mkdir(APPDIR); | 1869 | d.mkdir(APPDIR); |
@@ -1901,5 +1902,5 @@ void QTReaderApp::showtoolbarprefs() | |||
1901 | if ( !d.cd(APPDIR) ) | 1902 | if ( !d.cd(APPDIR) ) |
1902 | { // "/tmp" | 1903 | { // "/tmp" |
1903 | qWarning( "Cannot find the \"~/%s\" directory", APPDIR ); | 1904 | owarn << "Cannot find the \"~/" << APPDIR << "\" directory" << oendl; |
1904 | d = QDir::home(); | 1905 | d = QDir::home(); |
1905 | d.mkdir(APPDIR); | 1906 | d.mkdir(APPDIR); |
@@ -2176,5 +2177,5 @@ void QTReaderApp::editFind() | |||
2176 | void QTReaderApp::findNext() | 2177 | void QTReaderApp::findNext() |
2177 | { | 2178 | { |
2178 | // // qDebug("findNext called\n"); | 2179 | // // odebug << "findNext called\n" << oendl; |
2179 | #ifdef __ISEARCH | 2180 | #ifdef __ISEARCH |
2180 | QString arg = searchEdit->text(); | 2181 | QString arg = searchEdit->text(); |
@@ -2272,10 +2273,10 @@ bool QTReaderApp::dosearch(size_t start, CDrawBuffer& test, const QRegExp& arg) | |||
2272 | } | 2273 | } |
2273 | } | 2274 | } |
2274 | // qDebug("Found it at %u:%u", pos, offset); | 2275 | // odebug << "Found it at " << pos << ":" << offset << "" << oendl; |
2275 | pbar->hide(); | 2276 | pbar->hide(); |
2276 | // qDebug("Hid"); | 2277 | // odebug << "Hid" << oendl; |
2277 | reader->locate(pos+offset); | 2278 | reader->locate(pos+offset); |
2278 | // qDebug("Loacted"); | 2279 | // odebug << "Loacted" << oendl; |
2279 | // qDebug("page up"); | 2280 | // odebug << "page up" << oendl; |
2280 | ret = true; | 2281 | ret = true; |
2281 | } | 2282 | } |
@@ -2334,5 +2335,5 @@ void QTReaderApp::search() | |||
2334 | void QTReaderApp::openFile( const QString &f ) | 2335 | void QTReaderApp::openFile( const QString &f ) |
2335 | { | 2336 | { |
2336 | // qDebug("File:%s", (const char*)f); | 2337 | // odebug << "File:" << f << "" << oendl; |
2337 | // openFile(DocLnk(f)); | 2338 | // openFile(DocLnk(f)); |
2338 | //} | 2339 | //} |
@@ -2381,5 +2382,5 @@ void QTReaderApp::resizeEvent(QResizeEvent* e) | |||
2381 | void QTReaderApp::handlekey(QKeyEvent* e) | 2382 | void QTReaderApp::handlekey(QKeyEvent* e) |
2382 | { | 2383 | { |
2383 | // qDebug("Keypress event"); | 2384 | // odebug << "Keypress event" << oendl; |
2384 | timeb now; | 2385 | timeb now; |
2385 | ftime(&now); | 2386 | ftime(&now); |
@@ -2393,5 +2394,5 @@ void QTReaderApp::handlekey(QKeyEvent* e) | |||
2393 | { | 2394 | { |
2394 | case Key_Escape: | 2395 | case Key_Escape: |
2395 | // qDebug("escape event"); | 2396 | // odebug << "escape event" << oendl; |
2396 | if (m_disableesckey) | 2397 | if (m_disableesckey) |
2397 | { | 2398 | { |
@@ -2408,5 +2409,5 @@ void QTReaderApp::handlekey(QKeyEvent* e) | |||
2408 | else | 2409 | else |
2409 | { | 2410 | { |
2410 | // qDebug("escape action"); | 2411 | // odebug << "escape action" << oendl; |
2411 | doAction(m_escapeTarget, e); | 2412 | doAction(m_escapeTarget, e); |
2412 | } | 2413 | } |
@@ -2507,9 +2508,9 @@ void QTReaderApp::showEditTools() | |||
2507 | else | 2508 | else |
2508 | { | 2509 | { |
2509 | //qDebug("him"); | 2510 | // odebug << "him" << oendl; |
2510 | #ifdef USEQPE | 2511 | #ifdef USEQPE |
2511 | Global::hideInputMethod(); | 2512 | Global::hideInputMethod(); |
2512 | #endif | 2513 | #endif |
2513 | //qDebug("eb"); | 2514 | // odebug << "eb" << oendl; |
2514 | menubar->show(); | 2515 | menubar->show(); |
2515 | if (fileBar != NULL) fileBar->show(); | 2516 | if (fileBar != NULL) fileBar->show(); |
@@ -2533,7 +2534,7 @@ void QTReaderApp::showEditTools() | |||
2533 | } | 2534 | } |
2534 | if (m_fontVisible) m_fontBar->show(); | 2535 | if (m_fontVisible) m_fontBar->show(); |
2535 | //qDebug("sn"); | 2536 | // odebug << "sn" << oendl; |
2536 | showNormal(); | 2537 | showNormal(); |
2537 | //qDebug("sm"); | 2538 | // odebug << "sm" << oendl; |
2538 | #ifdef USEQPE | 2539 | #ifdef USEQPE |
2539 | showMaximized(); | 2540 | showMaximized(); |
@@ -2542,9 +2543,9 @@ void QTReaderApp::showEditTools() | |||
2542 | } | 2543 | } |
2543 | 2544 | ||
2544 | // qDebug("uc"); | 2545 | // odebug << "uc" << oendl; |
2545 | updateCaption(); | 2546 | updateCaption(); |
2546 | // qDebug("rw"); | 2547 | // odebug << "rw" << oendl; |
2547 | editorStack->raiseWidget( reader ); | 2548 | editorStack->raiseWidget( reader ); |
2548 | // qDebug("sf"); | 2549 | // odebug << "sf" << oendl; |
2549 | reader->setFocus(); | 2550 | reader->setFocus(); |
2550 | reader->refresh(); | 2551 | reader->refresh(); |
@@ -2615,5 +2616,5 @@ void QTReaderApp::setDocument(const QString& fileref) | |||
2615 | void QTReaderApp::closeEvent( QCloseEvent *e ) | 2616 | void QTReaderApp::closeEvent( QCloseEvent *e ) |
2616 | { | 2617 | { |
2617 | // qDebug("Close event"); | 2618 | // odebug << "Close event" << oendl; |
2618 | if (m_fullscreen) | 2619 | if (m_fullscreen) |
2619 | { | 2620 | { |
@@ -2632,5 +2633,5 @@ void QTReaderApp::closeEvent( QCloseEvent *e ) | |||
2632 | if ((m_escapeTarget != cesNone) && m_bcloseDisabled) | 2633 | if ((m_escapeTarget != cesNone) && m_bcloseDisabled) |
2633 | { | 2634 | { |
2634 | //qDebug("Close disabled"); | 2635 | // odebug << "Close disabled" << oendl; |
2635 | m_bcloseDisabled = false; | 2636 | m_bcloseDisabled = false; |
2636 | e->ignore(); | 2637 | e->ignore(); |
@@ -2710,5 +2711,5 @@ bool QTReaderApp::listbkmk(CList<Bkmk>* plist, const QString& _lab) | |||
2710 | { | 2711 | { |
2711 | #ifdef _UNICODE | 2712 | #ifdef _UNICODE |
2712 | // qDebug("Item:%s", (const char*)toQString(i->name())); | 2713 | // odebug << "Item:" << toQString(i->name()) << "" << oendl; |
2713 | bkmkselector->insertItem(toQString(i->name())); | 2714 | bkmkselector->insertItem(toQString(i->name())); |
2714 | #else | 2715 | #else |
@@ -2739,7 +2740,7 @@ void QTReaderApp::do_regedit() | |||
2739 | // fileBar->hide(); | 2740 | // fileBar->hide(); |
2740 | reader->bDoUpdates = false; | 2741 | reader->bDoUpdates = false; |
2741 | // qDebug("Showing regbar"); | 2742 | // odebug << "Showing regbar" << oendl; |
2742 | regBar->show(); | 2743 | regBar->show(); |
2743 | // qDebug("Showing kbd"); | 2744 | // odebug << "Showing kbd" << oendl; |
2744 | #ifdef USEQPE | 2745 | #ifdef USEQPE |
2745 | Global::showInputMethod(); | 2746 | Global::showInputMethod(); |
@@ -2757,8 +2758,8 @@ bool QTReaderApp::openfrombkmk(Bkmk* bk) | |||
2757 | CFiledata(bk->anno()).name() | 2758 | CFiledata(bk->anno()).name() |
2758 | ); | 2759 | ); |
2759 | //qDebug("fileinfo"); | 2760 | // odebug << "fileinfo" << oendl; |
2760 | if (!fn.isEmpty() && QFileInfo(fn).isFile()) | 2761 | if (!fn.isEmpty() && QFileInfo(fn).isFile()) |
2761 | { | 2762 | { |
2762 | //qDebug("Opening"); | 2763 | // odebug << "Opening" << oendl; |
2763 | openFile(fn); | 2764 | openFile(fn); |
2764 | struct stat fnstat; | 2765 | struct stat fnstat; |
@@ -2782,5 +2783,5 @@ bool QTReaderApp::openfrombkmk(Bkmk* bk) | |||
2782 | QMessageBox::warning(this, PROGNAME, "Not all file data used\nNew version?"); | 2783 | QMessageBox::warning(this, PROGNAME, "Not all file data used\nNew version?"); |
2783 | } | 2784 | } |
2784 | // qDebug("updating"); | 2785 | // odebug << "updating" << oendl; |
2785 | // showEditTools(); | 2786 | // showEditTools(); |
2786 | reader->locate(bk->value()); | 2787 | reader->locate(bk->value()); |
@@ -2813,5 +2814,5 @@ void QTReaderApp::gotobkmk(int ind) | |||
2813 | break; | 2814 | break; |
2814 | case cDelBkmk: | 2815 | case cDelBkmk: |
2815 | //// qDebug("Deleting:%s\n",(*pBkmklist)[ind]->name()); | 2816 | //// odebug << "Deleting:" << (*pBkmklist)[ind]->name() << "\n" << oendl; |
2816 | pBkmklist->erase(ind); | 2817 | pBkmklist->erase(ind); |
2817 | m_fBkmksChanged = true; | 2818 | m_fBkmksChanged = true; |
@@ -2913,5 +2914,5 @@ void QTReaderApp::gotobkmk(int ind) | |||
2913 | CFileSelector *f = new CFileSelector("text/html", this, NULL, !m_bFloatingDialog, TRUE, TRUE ); | 2914 | CFileSelector *f = new CFileSelector("text/html", this, NULL, !m_bFloatingDialog, TRUE, TRUE ); |
2914 | int ret = f->exec(); | 2915 | int ret = f->exec(); |
2915 | qDebug("Return:%d", ret); | 2916 | odebug << "Return:" << ret << "" << oendl; |
2916 | DocLnk* doc = f->getDoc(); | 2917 | DocLnk* doc = f->getDoc(); |
2917 | if (doc != NULL) | 2918 | if (doc != NULL) |
@@ -2933,9 +2934,9 @@ void QTReaderApp::gotobkmk(int ind) | |||
2933 | FileManager fm; | 2934 | FileManager fm; |
2934 | fm.saveFile( *doc, rt ); | 2935 | fm.saveFile( *doc, rt ); |
2935 | qDebug("YES"); | 2936 | odebug << "YES" << oendl; |
2936 | } | 2937 | } |
2937 | else | 2938 | else |
2938 | { | 2939 | { |
2939 | qDebug("NO"); | 2940 | odebug << "NO" << oendl; |
2940 | } | 2941 | } |
2941 | delete f; | 2942 | delete f; |
@@ -3010,5 +3011,5 @@ void QTReaderApp::do_regaction() | |||
3010 | #endif | 3011 | #endif |
3011 | case cSetConfigName: | 3012 | case cSetConfigName: |
3012 | // qDebug("Saving config"); | 3013 | // odebug << "Saving config" << oendl; |
3013 | do_saveconfig(regEdit->text(), false); | 3014 | do_saveconfig(regEdit->text(), false); |
3014 | break; | 3015 | break; |
@@ -3102,5 +3103,5 @@ void QTReaderApp::setfontHelper(const QString& lcn, int size) | |||
3102 | void QTReaderApp::do_setencoding(int i) | 3103 | void QTReaderApp::do_setencoding(int i) |
3103 | { | 3104 | { |
3104 | // qDebug("setencoding:%d", i); | 3105 | // odebug << "setencoding:" << i << "" << oendl; |
3105 | if (m_fontAction == cChooseEncoding) | 3106 | if (m_fontAction == cChooseEncoding) |
3106 | { | 3107 | { |
@@ -3110,7 +3111,7 @@ void QTReaderApp::do_setencoding(int i) | |||
3110 | m_fontBar->hide(); | 3111 | m_fontBar->hide(); |
3111 | m_fontVisible = false; | 3112 | m_fontVisible = false; |
3112 | // qDebug("showedit"); | 3113 | // odebug << "showedit" << oendl; |
3113 | if (reader->isVisible()) showEditTools(); | 3114 | if (reader->isVisible()) showEditTools(); |
3114 | // qDebug("showeditdone"); | 3115 | // odebug << "showeditdone" << oendl; |
3115 | } | 3116 | } |
3116 | 3117 | ||
@@ -3124,8 +3125,8 @@ void QTReaderApp::do_setfont(const QString& lcn) | |||
3124 | m_fontBar->hide(); | 3125 | m_fontBar->hide(); |
3125 | m_fontVisible = false; | 3126 | m_fontVisible = false; |
3126 | // qDebug("showedit"); | 3127 | // odebug << "showedit" << oendl; |
3127 | //if (reader->isVisible()) | 3128 | //if (reader->isVisible()) |
3128 | showEditTools(); | 3129 | showEditTools(); |
3129 | // qDebug("showeditdone"); | 3130 | // odebug << "showeditdone" << oendl; |
3130 | } | 3131 | } |
3131 | 3132 | ||
@@ -3134,5 +3135,5 @@ void QTReaderApp::do_autogen(const QString& regText) | |||
3134 | unsigned long fs, ts; | 3135 | unsigned long fs, ts; |
3135 | reader->sizes(fs,ts); | 3136 | reader->sizes(fs,ts); |
3136 | // // qDebug("Reg:%s\n", (const tchar*)(regEdit->text())); | 3137 | // // odebug << "Reg:" << (const tchar*)(regEdit->text()) << "\n" << oendl; |
3137 | m_autogenstr = regText; | 3138 | m_autogenstr = regText; |
3138 | QRegExp re(regText); | 3139 | QRegExp re(regText); |
@@ -3181,5 +3182,5 @@ void QTReaderApp::do_autogen(const QString& regText) | |||
3181 | void QTReaderApp::saveprefs() | 3182 | void QTReaderApp::saveprefs() |
3182 | { | 3183 | { |
3183 | // qDebug("saveprefs"); | 3184 | // odebug << "saveprefs" << oendl; |
3184 | // reader->saveprefs("uqtreader"); | 3185 | // reader->saveprefs("uqtreader"); |
3185 | // if (!m_loadedconfig) | 3186 | // if (!m_loadedconfig) |
@@ -3262,9 +3263,9 @@ void QTReaderApp::saveprefs() | |||
3262 | void QTReaderApp::oldFile() | 3263 | void QTReaderApp::oldFile() |
3263 | { | 3264 | { |
3264 | // qDebug("oldFile called"); | 3265 | // odebug << "oldFile called" << oendl; |
3265 | reader->setText(true); | 3266 | reader->setText(true); |
3266 | // qDebug("settext called"); | 3267 | // odebug << "settext called" << oendl; |
3267 | showEditTools(); | 3268 | showEditTools(); |
3268 | // qDebug("showedit called"); | 3269 | // odebug << "showedit called" << oendl; |
3269 | } | 3270 | } |
3270 | */ | 3271 | */ |
@@ -3342,8 +3343,8 @@ void QTReaderApp::readfilelist() | |||
3342 | BkmkFile bf((const char *)Global::applicationFileName(APPDIR,".openfiles")); | 3343 | BkmkFile bf((const char *)Global::applicationFileName(APPDIR,".openfiles")); |
3343 | #endif /* USEQPE */ | 3344 | #endif /* USEQPE */ |
3344 | // qDebug("Reading open files"); | 3345 | // odebug << "Reading open files" << oendl; |
3345 | pOpenlist = bf.readall(); | 3346 | pOpenlist = bf.readall(); |
3346 | // if (pOpenlist != NULL) qDebug("...with success"); | 3347 | // if (pOpenlist != NULL) odebug << "...with success" << oendl; |
3347 | // else qDebug("...without success!"); | 3348 | // else odebug << "...without success!" << oendl; |
3348 | } | 3349 | } |
3349 | 3350 | ||
@@ -3360,5 +3361,5 @@ void QTReaderApp::savefilelist() | |||
3360 | BkmkFile bf((const char *)Global::applicationFileName(APPDIR,".openfiles"), true); | 3361 | BkmkFile bf((const char *)Global::applicationFileName(APPDIR,".openfiles"), true); |
3361 | #endif /* USEQPE */ | 3362 | #endif /* USEQPE */ |
3362 | //qDebug("Writing open files"); | 3363 | // odebug << "Writing open files" << oendl; |
3363 | bf.write(*pOpenlist); | 3364 | bf.write(*pOpenlist); |
3364 | } | 3365 | } |
@@ -3470,5 +3471,5 @@ void QTReaderApp::showAnnotation() | |||
3470 | void QTReaderApp::OnWordSelected(const QString& wrd, size_t posn, const QString& line) | 3471 | void QTReaderApp::OnWordSelected(const QString& wrd, size_t posn, const QString& line) |
3471 | { | 3472 | { |
3472 | //// qDebug("OnWordSelected(%u):%s", posn, (const char*)wrd); | 3473 | //// odebug << "OnWordSelected(" << posn << "):" << wrd << "" << oendl; |
3473 | 3474 | ||
3474 | if (m_doClipboard) | 3475 | if (m_doClipboard) |
@@ -3520,5 +3521,5 @@ void QTReaderApp::doAction(ActionTypes a, QKeyEvent* e) | |||
3520 | { | 3521 | { |
3521 | e->accept(); | 3522 | e->accept(); |
3522 | //qDebug("Accepted"); | 3523 | // odebug << "Accepted" << oendl; |
3523 | switch (a) | 3524 | switch (a) |
3524 | { | 3525 | { |
@@ -3583,5 +3584,5 @@ void QTReaderApp::doAction(ActionTypes a, QKeyEvent* e) | |||
3583 | break; | 3584 | break; |
3584 | default: | 3585 | default: |
3585 | qDebug("Unknown ActionType:%u", a); | 3586 | odebug << "Unknown ActionType:" << a << "" << oendl; |
3586 | break; | 3587 | break; |
3587 | } | 3588 | } |
@@ -3601,5 +3602,5 @@ void QTReaderApp::SaveConfig() | |||
3601 | void QTReaderApp::do_saveconfig(const QString& _txt, bool full) | 3602 | void QTReaderApp::do_saveconfig(const QString& _txt, bool full) |
3602 | { | 3603 | { |
3603 | // qDebug("do_saveconfig:%s", (const char*)_txt); | 3604 | // odebug << "do_saveconfig:" << _txt << "" << oendl; |
3604 | #ifdef USEQPE | 3605 | #ifdef USEQPE |
3605 | QString configname; | 3606 | QString configname; |
@@ -3624,9 +3625,9 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) | |||
3624 | if (full) | 3625 | if (full) |
3625 | { | 3626 | { |
3626 | // qDebug("full:%s", (const char*)_txt); | 3627 | // odebug << "full:" << _txt << "" << oendl; |
3627 | QDir d = QDir::home(); // "/" | 3628 | QDir d = QDir::home(); // "/" |
3628 | if ( !d.cd(_txt) ) | 3629 | if ( !d.cd(_txt) ) |
3629 | { // "/tmp" | 3630 | { // "/tmp" |
3630 | qWarning( "Cannot find the \"~/%s\" directory", (const char*)_txt ); | 3631 | owarn << "Cannot find the \"~/" << _txt << "\" directory" << oendl; |
3631 | d = QDir::home(); | 3632 | d = QDir::home(); |
3632 | d.mkdir(_txt); | 3633 | d.mkdir(_txt); |
@@ -3640,5 +3641,5 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) | |||
3640 | if ( !d.cd(APPDIR) ) | 3641 | if ( !d.cd(APPDIR) ) |
3641 | { // "/tmp" | 3642 | { // "/tmp" |
3642 | qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); | 3643 | owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; |
3643 | d = QDir::home(); | 3644 | d = QDir::home(); |
3644 | d.mkdir(APPDIR); | 3645 | d.mkdir(APPDIR); |
@@ -3647,5 +3648,5 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) | |||
3647 | if ( !d.cd("configs") ) | 3648 | if ( !d.cd("configs") ) |
3648 | { // "/tmp" | 3649 | { // "/tmp" |
3649 | qWarning( "Cannot find the \"~/" APPDIR "/configs\" directory" ); | 3650 | owarn << "Cannot find the \"~/" APPDIR "/configs\" directory" << oendl; |
3650 | d = QDir::home(); | 3651 | d = QDir::home(); |
3651 | d.cd(APPDIR); | 3652 | d.cd(APPDIR); |
@@ -3655,5 +3656,5 @@ void QTReaderApp::do_saveconfig(const QString& _txt, bool full) | |||
3655 | fi.setFile(d, _txt); | 3656 | fi.setFile(d, _txt); |
3656 | } | 3657 | } |
3657 | //qDebug("Path:%s", (const char*)fi.absFilePath()); | 3658 | // odebug << "Path:" << fi.absFilePath() << "" << oendl; |
3658 | Config config(fi.absFilePath()); | 3659 | Config config(fi.absFilePath()); |
3659 | #endif | 3660 | #endif |
@@ -3935,5 +3936,5 @@ bool QTReaderApp::readconfig(const QString& _txt, bool full=false) | |||
3935 | if ( !d.cd(_txt) ) | 3936 | if ( !d.cd(_txt) ) |
3936 | { // "/tmp" | 3937 | { // "/tmp" |
3937 | qWarning( "Cannot find the \"~/%s\" directory", (const char*)_txt ); | 3938 | owarn << "Cannot find the \"~/" << _txt << "\" directory" << oendl; |
3938 | d = QDir::home(); | 3939 | d = QDir::home(); |
3939 | d.mkdir(_txt); | 3940 | d.mkdir(_txt); |
@@ -3947,5 +3948,5 @@ bool QTReaderApp::readconfig(const QString& _txt, bool full=false) | |||
3947 | if ( !d.cd(APPDIR) ) | 3948 | if ( !d.cd(APPDIR) ) |
3948 | { // "/tmp" | 3949 | { // "/tmp" |
3949 | qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); | 3950 | owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; |
3950 | d = QDir::home(); | 3951 | d = QDir::home(); |
3951 | d.mkdir(APPDIR); | 3952 | d.mkdir(APPDIR); |
@@ -3954,5 +3955,5 @@ bool QTReaderApp::readconfig(const QString& _txt, bool full=false) | |||
3954 | if ( !d.cd("configs") ) | 3955 | if ( !d.cd("configs") ) |
3955 | { // "/tmp" | 3956 | { // "/tmp" |
3956 | qWarning( "Cannot find the \"~/" APPDIR "/configs\" directory" ); | 3957 | owarn << "Cannot find the \"~/" APPDIR "/configs\" directory" << oendl; |
3957 | d = QDir::home(); | 3958 | d = QDir::home(); |
3958 | d.mkdir("configs"); | 3959 | d.mkdir("configs"); |
@@ -4062,5 +4063,5 @@ bool QTReaderApp::PopulateConfig(const char* tgtdir) | |||
4062 | QDir d = QDir::home(); // "/" | 4063 | QDir d = QDir::home(); // "/" |
4063 | if ( !d.cd(APPDIR) ) { // "/tmp" | 4064 | if ( !d.cd(APPDIR) ) { // "/tmp" |
4064 | qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); | 4065 | owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; |
4065 | d = QDir::home(); | 4066 | d = QDir::home(); |
4066 | d.mkdir(APPDIR); | 4067 | d.mkdir(APPDIR); |
@@ -4068,5 +4069,5 @@ bool QTReaderApp::PopulateConfig(const char* tgtdir) | |||
4068 | } | 4069 | } |
4069 | if ( !d.cd(tgtdir) ) { // "/tmp" | 4070 | if ( !d.cd(tgtdir) ) { // "/tmp" |
4070 | qWarning( "Cannot find the \"~/" APPDIR "/%s\" directory", tgtdir ); | 4071 | owarn << "Cannot find the \"~/" APPDIR "/" << tgtdir << "\" directory" << oendl; |
4071 | d = QDir::home(); | 4072 | d = QDir::home(); |
4072 | d.mkdir(tgtdir); | 4073 | d.mkdir(tgtdir); |
@@ -4085,5 +4086,5 @@ bool QTReaderApp::PopulateConfig(const char* tgtdir) | |||
4085 | cnt++; | 4086 | cnt++; |
4086 | 4087 | ||
4087 | //qDebug( "%10li %s", fi->size(), fi->fileName().data() ); | 4088 | //odebug << "" << fi->size() << " " << fi->fileName().data() << "" << oendl; |
4088 | ++it; // goto next list element | 4089 | ++it; // goto next list element |
4089 | } | 4090 | } |
@@ -4169,5 +4170,5 @@ void QTReaderApp::OnURLSelected(const QString& href) | |||
4169 | QClipboard* cb = QApplication::clipboard(); | 4170 | QClipboard* cb = QApplication::clipboard(); |
4170 | cb->setText(href); | 4171 | cb->setText(href); |
4171 | qDebug("<a href=\"%s\">%s</a>", (const char*)href, (const char*)href); | 4172 | odebug << "<a href=\"" << href << "\">" << href << "</a>" << oendl; |
4172 | } | 4173 | } |
4173 | if (m_url_localfile) | 4174 | if (m_url_localfile) |
@@ -4193,5 +4194,5 @@ void QTReaderApp::writeUrl(const QString& file, const QString& href) | |||
4193 | if ( !d.cd(APPDIR) ) | 4194 | if ( !d.cd(APPDIR) ) |
4194 | { // "/tmp" | 4195 | { // "/tmp" |
4195 | qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); | 4196 | owarn << "Cannot find the \"~/" APPDIR "\" directory" << oendl; |
4196 | d = QDir::home(); | 4197 | d = QDir::home(); |
4197 | d.mkdir(APPDIR); | 4198 | d.mkdir(APPDIR); |
@@ -4200,5 +4201,5 @@ void QTReaderApp::writeUrl(const QString& file, const QString& href) | |||
4200 | if ( !d.cd("urls") ) | 4201 | if ( !d.cd("urls") ) |
4201 | { // "/tmp" | 4202 | { // "/tmp" |
4202 | qWarning( "Cannot find the \"~/" APPDIR "/urls\" directory" ); | 4203 | owarn << "Cannot find the \"~/" APPDIR "/urls\" directory" << oendl; |
4203 | d = QDir::home(); | 4204 | d = QDir::home(); |
4204 | d.cd(APPDIR); | 4205 | d.cd(APPDIR); |