-rw-r--r-- | noncore/apps/opie-reader/QTReaderApp.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/QTReaderApp.cpp b/noncore/apps/opie-reader/QTReaderApp.cpp index b985094..4f0f0a1 100644 --- a/noncore/apps/opie-reader/QTReaderApp.cpp +++ b/noncore/apps/opie-reader/QTReaderApp.cpp @@ -2497,129 +2497,129 @@ void QTReaderApp::infoClose() if (m_kmapchanged) { m_kmapchanged = false; #ifndef USEQPE QDir d = QDir::home(); // "/" d.cd(APPDIR); QFileInfo fi(d, ".keymap"); FILE* f = fopen((const char *)fi.absFilePath(), "w"); #else /* USEQPE */ FILE* f = fopen((const char *)Global::applicationFileName(APPDIR,".keymap"), "w"); #endif /* USEQPE */ if (f != NULL) { uint cnt = KEYMAPVERSION; fwrite(&cnt, sizeof(cnt), 1, f); cnt = kmap.count(); fwrite(&cnt, sizeof(cnt), 1, f); for (QMap<orKey,int>::Iterator i = kmap.begin(); i != kmap.end(); i++) { orKey key = i.key(); int data = i.data(); fwrite(&key, sizeof(key), 1, f); fwrite(&data, sizeof(data), 1, f); qDebug("Saved %s as %u", (const char*)key.text(), data); } fclose(f); } } showEditTools(); } /* void QTReaderApp::fileRevert() { clear(); fileOpen(); } void QTReaderApp::editCut() { #ifndef QT_NO_CLIPBOARD editor->cut(); #endif } */ void QTReaderApp::editMark() { m_savedpos = reader->pagelocate(); } void QTReaderApp::editCopy() { QClipboard* cb = QApplication::clipboard(); QString text; int ch; unsigned long currentpos = reader->pagelocate(); unsigned long endpos = reader->locate(); if (m_savedpos == 0xffffffff) { m_savedpos = currentpos; } reader->jumpto(m_savedpos); while (reader->explocate() < endpos && (ch = reader->getch()) != UEOF) { - text += ch; + text += QChar(ch); } cb->setText(text); reader->locate(currentpos); m_savedpos = 0xffffffff; } void QTReaderApp::gotoStart() { reader->locate(reader->buffdoc.startSection()); } void QTReaderApp::gotoEnd() { reader->dopageup(reader->buffdoc.endSection()); } void QTReaderApp::pageup() { reader->NavUp(); } void QTReaderApp::pagedn() { reader->NavDown(); } void QTReaderApp::pagemode(bool _b) { reader->setpagemode(_b); } /* void QTReaderApp::setspacing() { m_nRegAction = cMonoSpace; char lcn[20]; sprintf(lcn, "%lu", reader->m_charpc); regEdit->setText(lcn); do_regedit(); } */ void QTReaderApp::settarget() { m_nRegAction = cSetTarget; QString text = ((m_targetapp.isEmpty()) ? QString("") : m_targetapp) + "/" + ((m_targetmsg.isEmpty()) ? QString("") : m_targetmsg); regEdit->setText(text); do_regedit(); } /* void QTReaderApp::do_mono(const QString& lcn) { bool ok; unsigned long ulcn = lcn.toULong(&ok); if (ok) { reader->m_charpc = ulcn; reader->setfont(); reader->refresh(); // reader->setmono(true); } else |