Use tdeApp

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/27/head
Michele Calgaro 2 months ago
parent 0ed59f2f13
commit ba759c68a0
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -82,7 +82,7 @@ bool OpenOffice::connect() {
StatusBar::self()->setStatus(i18n("Connecting to OpenOffice.org..."));
if(d->port == -1) {
TDEConfigGroup config(kapp->config(), "OpenOffice.org");
TDEConfigGroup config(tdeApp->config(), "OpenOffice.org");
d->host = config.readEntry("Host", TQString::fromLatin1("localhost"));
d->port = config.readNumEntry("Port", 2083);
d->pipe = config.readPathEntry("Pipe");
@ -253,7 +253,7 @@ bool OpenOffice::connectionDialog() {
d->handler->setPipe(TQFile::encodeName(d->pipe));
}
TDEConfigGroup config(kapp->config(), "OpenOffice.org");
TDEConfigGroup config(tdeApp->config(), "OpenOffice.org");
config.writeEntry("Host", d->host);
config.writeEntry("Port", d->port);
config.writePathEntry("Pipe", d->pipe);

@ -636,7 +636,7 @@ void ConfigDialog::readFetchConfig() {
// there's weird layout bug if it's not hidden
cw->hide();
}
kapp->processEvents();
tdeApp->processEvents();
}
if(m_sourceListView->childCount() == 0) {

@ -82,7 +82,7 @@ void DetailedListView::addCollection(Data::CollPtr coll_) {
m_imageColumns.clear();
// myDebug() << "DetailedListView::addCollection()" << endl;
TDEConfigGroup config(kapp->config(), TQString::fromLatin1("Options - %1").arg(coll_->typeName()));
TDEConfigGroup config(tdeApp->config(), TQString::fromLatin1("Options - %1").arg(coll_->typeName()));
TQString configN;
if(coll_->type() == Data::Collection::Base) {
@ -170,7 +170,7 @@ void DetailedListView::addCollection(Data::CollPtr coll_) {
setPrevSortedColumn(prevSortCol, prev2SortCol);
triggerUpdate();
kapp->processEvents();
tdeApp->processEvents();
setUpdatesEnabled(false);
m_loadingCollection = true;
@ -747,7 +747,7 @@ void DetailedListView::slotUpdatePixmap() {
}
void DetailedListView::saveConfig(Tellico::Data::CollPtr coll_, int configIndex_) {
TDEConfigGroup config(kapp->config(), TQString::fromLatin1("Options - %1").arg(coll_->typeName()));
TDEConfigGroup config(tdeApp->config(), TQString::fromLatin1("Options - %1").arg(coll_->typeName()));
// all of this is to have custom settings on a per file basis
TQString configN;

@ -195,7 +195,7 @@ bool Document::saveDocument(const KURL& url_) {
// in case we're still loading images, give that a chance to cancel
m_cancelImageWriting = true;
kapp->processEvents();
tdeApp->processEvents();
ProgressItem& item = ProgressManager::self()->newProgressItem(this, i18n("Saving file..."), false);
ProgressItem::Done done(this);
@ -528,7 +528,7 @@ void Document::slotLoadAllImages() {
break;
}
// stay responsive, do this in the background
kapp->processEvents();
tdeApp->processEvents();
}
if(m_cancelImageWriting) {
@ -570,7 +570,7 @@ void Document::writeAllImages(int cacheDir_, const KURL& localDir_) {
}
if(j%stepSize == 0) {
ProgressManager::self()->setProgress(this, j/stepSize);
kapp->processEvents();
tdeApp->processEvents();
}
++j;
if(m_cancelImageWriting) {

@ -129,7 +129,7 @@ void EntryUpdater::slotDone() {
return;
}
}
kapp->processEvents();
tdeApp->processEvents();
// so the entry updater can clean up a bit
TQTimer::singleShot(500, this, TQ_SLOT(slotStartNext()));
}
@ -149,7 +149,7 @@ void EntryUpdater::slotResult(Fetch::SearchResult* result_) {
result_->fetcher->stop();
}
}
kapp->processEvents();
tdeApp->processEvents();
}
void EntryUpdater::slotCancel() {

@ -67,7 +67,7 @@ EntryView::EntryView(TQWidget* parent_, const char* name_) : TDEHTMLPart(new Ent
connect(browserExtension(), TQ_SIGNAL(openURLRequest(const KURL&, const KParts::URLArgs&)),
TQ_SLOT(slotOpenURL(const KURL&)));
connect(kapp, TQ_SIGNAL(tdedisplayPaletteChanged()), TQ_SLOT(slotResetColors()));
connect(tdeApp, TQ_SIGNAL(tdedisplayPaletteChanged()), TQ_SLOT(slotResetColors()));
}
EntryView::~EntryView() {

@ -261,7 +261,7 @@ void Z3950Connection::run() {
}
// save syntax change for next time
if(m_syntax != newSyntax) {
kapp->postEvent(m_fetcher, new Z3950SyntaxChange(newSyntax));
tdeApp->postEvent(m_fetcher, new Z3950SyntaxChange(newSyntax));
m_syntax = newSyntax;
}
@ -355,15 +355,15 @@ bool Z3950Connection::makeConnection() {
void Z3950Connection::done() {
checkPendingEvents();
kapp->postEvent(m_fetcher, new Z3950ConnectionDone(m_hasMore));
tdeApp->postEvent(m_fetcher, new Z3950ConnectionDone(m_hasMore));
}
void Z3950Connection::done(const TQString& msg_, int type_) {
checkPendingEvents();
if(m_aborted) {
kapp->postEvent(m_fetcher, new Z3950ConnectionDone(m_hasMore));
tdeApp->postEvent(m_fetcher, new Z3950ConnectionDone(m_hasMore));
} else {
kapp->postEvent(m_fetcher, new Z3950ConnectionDone(m_hasMore, msg_, type_));
tdeApp->postEvent(m_fetcher, new Z3950ConnectionDone(m_hasMore, msg_, type_));
}
}

@ -227,7 +227,7 @@ FetchDialog::FetchDialog(TQWidget* parent_, const char* name_)
resize(configDialogSize(TQString::fromLatin1("Fetch Dialog Options")));
TDEConfigGroup config(kapp->config(), "Fetch Dialog Options");
TDEConfigGroup config(tdeApp->config(), "Fetch Dialog Options");
TQValueList<int> splitList = config.readIntListEntry("Splitter Sizes");
if(!splitList.empty()) {
split->setSizes(splitList);
@ -287,7 +287,7 @@ FetchDialog::~FetchDialog() {
saveDialogSize(TQString::fromLatin1("Fetch Dialog Options"));
TDEConfigGroup config(kapp->config(), "Fetch Dialog Options");
TDEConfigGroup config(tdeApp->config(), "Fetch Dialog Options");
config.writeEntry("Splitter Sizes", static_cast<TQSplitter*>(m_listView->parentWidget())->sizes());
config.writeEntry("Search Key", m_keyCombo->currentData().toInt());
config.writeEntry("Search Source", m_sourceCombo->currentText());
@ -312,7 +312,7 @@ void FetchDialog::slotSearchClicked() {
SmallIconSet(TQString::fromLatin1("cancel"))));
startProgress();
setStatus(i18n("Searching..."));
kapp->processEvents();
tdeApp->processEvents();
Fetch::Manager::self()->startSearch(m_sourceCombo->currentText(),
static_cast<Fetch::FetchKey>(m_keyCombo->currentData().toInt()),
value);
@ -430,7 +430,7 @@ void FetchDialog::slotResultFound(Tellico::Fetch::SearchResult* result_) {
(void) new SearchResultItem(m_listView, result_);
++m_resultCount;
adjustColumnWidth();
kapp->processEvents();
tdeApp->processEvents();
}
void FetchDialog::slotAddEntry() {
@ -472,7 +472,7 @@ void FetchDialog::slotMoreClicked() {
SmallIconSet(TQString::fromLatin1("cancel"))));
startProgress();
setStatus(i18n("Searching..."));
kapp->processEvents();
tdeApp->processEvents();
Fetch::Manager::self()->continueSearch();
}
@ -530,7 +530,7 @@ void FetchDialog::slotInit() {
Kernel::self()->sorry(i18n("No Internet sources are available for your current collection type."), this);
}
TDEConfigGroup config(kapp->config(), "Fetch Dialog Options");
TDEConfigGroup config(tdeApp->config(), "Fetch Dialog Options");
int key = config.readNumEntry("Search Key", Fetch::FetchFirst);
// only change key if valid
if(key > Fetch::FetchFirst) {

@ -37,7 +37,7 @@ ListView::ListView(TQWidget* parent_, const char* name_) : TDEListView(parent_,
// call it once to initialize
slotUpdateColors();
#endif
connect(kapp, TQ_SIGNAL(tdedisplayPaletteChanged()), TQ_SLOT(slotUpdateColors()));
connect(tdeApp, TQ_SIGNAL(tdedisplayPaletteChanged()), TQ_SLOT(slotUpdateColors()));
m_comparisons.setAutoDelete(true);
}

@ -116,9 +116,9 @@ MainWindow::MainWindow(TQWidget* parent_/*=0*/, const char* name_/*=0*/) : TDEMa
m_initialized(false),
m_newDocument(true) {
if(!kapp->dcopClient()->isRegistered()) {
kapp->dcopClient()->registerAs("tellico");
kapp->dcopClient()->setDefaultObject(objId());
if(!tdeApp->dcopClient()->isRegistered()) {
tdeApp->dcopClient()->registerAs("tellico");
tdeApp->dcopClient()->setDefaultObject(objId());
}
m_fetchActions.setAutoDelete(true); // these are the fetcher actions
@ -1055,7 +1055,7 @@ void MainWindow::saveProperties(TDEConfig* cfg_) {
KURL url = Data::Document::self()->URL();
cfg_->writeEntry("filename", url.url());
cfg_->writeEntry("modified", Data::Document::self()->isModified());
TQString tempname = KURL::encode_string(kapp->tempSaveName(url.url()));
TQString tempname = KURL::encode_string(tdeApp->tempSaveName(url.url()));
KURL tempurl;
tempurl.setPath(tempname);
Data::Document::self()->saveDocument(tempurl);
@ -1067,7 +1067,7 @@ void MainWindow::readProperties(TDEConfig* cfg_) {
bool modified = cfg_->readBoolEntry(TQString::fromLatin1("modified"), false);
if(modified) {
bool canRecover;
TQString tempname = kapp->checkRecoverFile(filename, canRecover);
TQString tempname = tdeApp->checkRecoverFile(filename, canRecover);
if(canRecover) {
KURL tempurl;
@ -1422,7 +1422,7 @@ void MainWindow::activateEditSlot(const char* slot_) {
if(m_editDialog->isVisible()) {
w = m_editDialog->focusWidget();
} else {
w = kapp->focusWidget();
w = tdeApp->focusWidget();
}
if(w && w->isVisible()) {

@ -102,7 +102,7 @@ void StatusBar::slotProgress(uint progress_) {
if(ProgressManager::self()->anyCanBeCancelled()) {
m_cancelButton->show();
}
kapp->processEvents(); // needed so the window gets updated ???
tdeApp->processEvents(); // needed so the window gets updated ???
}
}

@ -53,7 +53,7 @@ TQString Tellico::uid(int l, bool prefix) {
if(prefix) {
uid = TQString::fromLatin1("Tellico");
}
uid.append(kapp->randomString(TQMAX(l - uid.length(), 0)));
uid.append(tdeApp->randomString(TQMAX(l - uid.length(), 0)));
return uid;
}
@ -203,16 +203,16 @@ TQString Tellico::saveLocation(const TQString& dir_) {
}
Tellico::GUI::CursorSaver::CursorSaver(const TQCursor& cursor_) : m_restored(false) {
kapp->setOverrideCursor(cursor_);
tdeApp->setOverrideCursor(cursor_);
}
Tellico::GUI::CursorSaver::~CursorSaver() {
if(!m_restored) {
kapp->restoreOverrideCursor();
tdeApp->restoreOverrideCursor();
}
}
void Tellico::GUI::CursorSaver::restore() {
kapp->restoreOverrideCursor();
tdeApp->restoreOverrideCursor();
m_restored = true;
}

@ -87,7 +87,7 @@ bool AlexandriaExporter::exec() {
success &= writeFile(libraryDir, entryIt.data());
if(showProgress && j%stepSize == 0) {
item.setProgress(j);
kapp->processEvents();
tdeApp->processEvents();
}
}
return success;

@ -172,7 +172,7 @@ Tellico::Data::CollPtr AlexandriaImporter::collection() {
if(showProgress && j%stepSize == 0) {
ProgressManager::self()->setProgress(this, j);
kapp->processEvents();
tdeApp->processEvents();
}
}

@ -95,7 +95,7 @@ Tellico::Data::CollPtr AMCImporter::collection() {
readEntry();
if(showProgress) {
ProgressManager::self()->setProgress(this, f->at());
kapp->processEvents();
tdeApp->processEvents();
}
}

@ -97,7 +97,7 @@ Tellico::Data::CollPtr AudioFileImporter::collection() {
for(TQStringList::ConstIterator it2 = list.begin(); it2 != list.end(); ++it2) {
files += dir.absFilePath(*it2);
}
// kapp->processEvents(); not needed ?
// tdeApp->processEvents(); not needed ?
}
if(m_cancelled) {
@ -270,7 +270,7 @@ Tellico::Data::CollPtr AudioFileImporter::collection() {
if(showProgress && j%stepSize == 0) {
ProgressManager::self()->setTotalSteps(this, files.count() + directoryFiles.count());
ProgressManager::self()->setProgress(this, j);
kapp->processEvents();
tdeApp->processEvents();
}
/* kdDebug() << "-- TAG --" << endl;
@ -319,7 +319,7 @@ Tellico::Data::CollPtr AudioFileImporter::collection() {
if(showProgress && j%stepSize == 0) {
ProgressManager::self()->setProgress(this, j);
kapp->processEvents();
tdeApp->processEvents();
}
}

@ -46,7 +46,7 @@ BibtexImporter::BibtexImporter(const TQString& text_) : Importer(text_)
BibtexImporter::~BibtexImporter() {
bt_cleanup();
if(m_readUTF8) {
TDEConfigGroup config(kapp->config(), "Import Options");
TDEConfigGroup config(tdeApp->config(), "Import Options");
config.writeEntry("Bibtex UTF8", m_readUTF8->isChecked());
}
}
@ -206,7 +206,7 @@ Tellico::Data::CollPtr BibtexImporter::readCollection(const TQString& text, int
if(showProgress && j%stepSize == 0) {
ProgressManager::self()->setProgress(this, n*100 + 100*j/count);
kapp->processEvents();
tdeApp->processEvents();
}
}
@ -295,7 +295,7 @@ TQWidget* BibtexImporter::widget(TQWidget* parent_, const char* name_/*=0*/) {
m_readLocale->setChecked(true);
TQWhatsThis::add(m_readLocale, i18n("Read the imported file in the local encoding."));
TDEConfigGroup config(kapp->config(), "Import Options");
TDEConfigGroup config(tdeApp->config(), "Import Options");
bool useUTF8 = config.readBoolEntry("Bibtex UTF8", false);
if(useUTF8) {
m_readUTF8->setChecked(true);

@ -64,7 +64,7 @@ void BibtexmlImporter::loadDomDocument() {
if(showProgress && j%stepSize == 0) {
ProgressManager::self()->setProgress(this, j);
kapp->processEvents();
tdeApp->processEvents();
}
} // end entry loop
}

@ -222,7 +222,7 @@ Tellico::Data::CollPtr CSVImporter::collection() {
if(showProgress && j%stepSize == 0) {
ProgressManager::self()->setProgress(this, j);
kapp->processEvents();
tdeApp->processEvents();
}
++j;
}

@ -168,7 +168,7 @@ Tellico::Data::CollPtr FileListingImporter::collection() {
if(showProgress && j%stepSize == 0) {
ProgressManager::self()->setProgress(this, j);
kapp->processEvents();
tdeApp->processEvents();
}
}

@ -317,7 +317,7 @@ void FreeDBImporter::readCache() {
for(TQStringList::ConstIterator it2 = list.begin(); it2 != list.end(); ++it2) {
files.insert(*it2, dir.absFilePath(*it2), false);
}
// kapp->processEvents(); // really needed ?
// tdeApp->processEvents(); // really needed ?
}
const TQString title = TQString::fromLatin1("title");
@ -420,7 +420,7 @@ void FreeDBImporter::readCache() {
if(showProgress && step%stepSize == 0) {
ProgressManager::self()->setProgress(this, step);
kapp->processEvents();
tdeApp->processEvents();
}
}
#endif

@ -224,7 +224,7 @@ void GCfilmsImporter::readGCfilms(const TQString& text_) {
if(showProgress && j%stepSize == 0) {
ProgressManager::self()->setProgress(this, j);
kapp->processEvents();
tdeApp->processEvents();
}
}

@ -451,7 +451,7 @@ void HTMLExporter::writeImages(Data::CollPtr coll_) {
}
if(++count == processCount) {
kapp->processEvents();
tdeApp->processEvents();
count = 0;
}
}
@ -662,7 +662,7 @@ bool HTMLExporter::copyFiles() {
if(options() & ExportProgress) {
ProgressManager::self()->setProgress(this, TQMIN(start+j/stepSize, 99));
}
kapp->processEvents();
tdeApp->processEvents();
}
}
return true;
@ -731,7 +731,7 @@ bool HTMLExporter::writeEntryFiles() {
if(options() & ExportProgress) {
ProgressManager::self()->setProgress(this, TQMIN(start+j/stepSize, 99));
}
kapp->processEvents();
tdeApp->processEvents();
}
}
// the images in "pics/" are special data images, copy them always

@ -215,7 +215,7 @@ Tellico::Data::CollPtr PDFImporter::collection() {
if(showProgress) {
ProgressManager::self()->setProgress(this, j);
kapp->processEvents();
tdeApp->processEvents();
}
}

@ -278,7 +278,7 @@ void RISImporter::readURL(const KURL& url_, int n, const TQDict<Data::Field>& ri
if(showProgress && j%stepSize == 0) {
ProgressManager::self()->setProgress(this, n*100 + 100*j/length);
kapp->processEvents();
tdeApp->processEvents();
}
}

@ -314,7 +314,7 @@ void TellicoImporter::loadXMLData(const TQByteArray& data_, bool loadImages_) {
// not exactly right, but close enough
if(showProgress && j%stepSize == 0) {
ProgressManager::self()->setProgress(this, j);
kapp->processEvents();
tdeApp->processEvents();
}
} else {
// myDebug() << "...skipping " << n.localName() << " (" << n.namespaceURI() << ")" << endl;
@ -866,7 +866,7 @@ void TellicoImporter::loadZipData() {
m_images.remove(*it);
}
if(j%stepSize == 0) {
kapp->processEvents();
tdeApp->processEvents();
}
}

@ -125,7 +125,7 @@ void TellicoSaxImporter::loadXMLData(const TQByteArray& data_, bool loadImages_)
pos += blockSize;
if(showProgress) {
ProgressManager::self()->setProgress(this, pos);
kapp->processEvents();
tdeApp->processEvents();
}
}
@ -252,7 +252,7 @@ void TellicoSaxImporter::loadZipData() {
m_images.remove(*it);
}
if(j%stepSize == 0) {
kapp->processEvents();
tdeApp->processEvents();
}
}

@ -109,7 +109,7 @@ bool TellicoZipExporter::exec() {
imageSet.add(id);
if(j%stepSize == 0) {
ProgressManager::self()->setProgress(this, TQMIN(10+j/stepSize, 99));
kapp->processEvents();
tdeApp->processEvents();
}
}
}

Loading…
Cancel
Save