summaryrefslogtreecommitdiffstats
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index c09b3c4..c6b8dfb 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -858,14 +858,14 @@ void MainWindow::initFileOpen(bool nofile_) {
const int type = Kernel::self()->collectionType();
TQString welcomeFile = locate("appdata", TQString::tqfromLatin1("welcome.html"));
TQString text = FileHandler::readTextFile(welcomeFile);
- text.tqreplace(TQString::tqfromLatin1("$FGCOLOR$"), Config::templateTextColor(type).name());
- text.tqreplace(TQString::tqfromLatin1("$BGCOLOR$"), Config::templateBaseColor(type).name());
- text.tqreplace(TQString::tqfromLatin1("$COLOR1$"), Config::templateHighlightedTextColor(type).name());
- text.tqreplace(TQString::tqfromLatin1("$COLOR2$"), Config::templateHighlightedBaseColor(type).name());
- text.tqreplace(TQString::tqfromLatin1("$IMGDIR$"), TQFile::encodeName(ImageFactory::tempDir()));
- text.tqreplace(TQString::tqfromLatin1("$BANNER$"),
+ text.replace(TQString::tqfromLatin1("$FGCOLOR$"), Config::templateTextColor(type).name());
+ text.replace(TQString::tqfromLatin1("$BGCOLOR$"), Config::templateBaseColor(type).name());
+ text.replace(TQString::tqfromLatin1("$COLOR1$"), Config::templateHighlightedTextColor(type).name());
+ text.replace(TQString::tqfromLatin1("$COLOR2$"), Config::templateHighlightedBaseColor(type).name());
+ text.replace(TQString::tqfromLatin1("$IMGDIR$"), TQFile::encodeName(ImageFactory::tempDir()));
+ text.replace(TQString::tqfromLatin1("$BANNER$"),
i18n("Welcome to the Tellico Collection Manager"));
- text.tqreplace(TQString::tqfromLatin1("$WELCOMETEXT$"),
+ text.replace(TQString::tqfromLatin1("$WELCOMETEXT$"),
i18n("<h3>Tellico is a tool for managing collections of books, "
"videos, music, and whatever else you want to catalog.</h3>"
"<h3>New entries can be added to your collection by "
@@ -943,7 +943,7 @@ void MainWindow::readCollectionOptions(Data::CollPtr coll_) {
entryGroup = group.readEntry("Group By", defaultGroup);
}
}
- if(entryGroup.isEmpty() || !coll_->entryGroups().tqcontains(entryGroup)) {
+ if(entryGroup.isEmpty() || !coll_->entryGroups().contains(entryGroup)) {
entryGroup = defaultGroup;
}
m_groupView->setGroupField(entryGroup);
@@ -1426,7 +1426,7 @@ void MainWindow::activateEditSlot(const char* slot_) {
if(w && w->isVisible()) {
TQMetaObject* meta = w->tqmetaObject();
- int idx = meta->tqfindSlot(slot_ + 1, true);
+ int idx = meta->findSlot(slot_ + 1, true);
if(idx > -1) {
w->qt_invoke(idx, 0);
}
@@ -1610,7 +1610,7 @@ void MainWindow::slotUpdateCollectionToolBar(Data::CollPtr coll_) {
}
TQString current = m_groupView->groupBy();
- if(current.isEmpty() || !coll_->entryGroups().tqcontains(current)) {
+ if(current.isEmpty() || !coll_->entryGroups().contains(current)) {
current = coll_->defaultGroupField();
}
@@ -1631,7 +1631,7 @@ void MainWindow::slotUpdateCollectionToolBar(Data::CollPtr coll_) {
}
TQStringList names = groupMap.keys();
- int index = names.tqfindIndex(current);
+ int index = names.findIndex(current);
if(index == -1) {
current = names[0];
index = 0;
@@ -1824,8 +1824,8 @@ void MainWindow::setFilter(const TQString& text_) {
if(!text.isEmpty()) {
filter = new Filter(Filter::MatchAll);
TQString fieldName = TQString();
- // if the text tqcontains '=' assume it's a field name or title
- if(text.tqfind('=') > -1) {
+ // if the text contains '=' assume it's a field name or title
+ if(text.find('=') > -1) {
fieldName = text.section('=', 0, 0).stripWhiteSpace();
text = text.section('=', 1).stripWhiteSpace();
// check that the field name might be a title
@@ -1836,7 +1836,7 @@ void MainWindow::setFilter(const TQString& text_) {
// if the text contains any non-word characters, assume it's a regexp
// but \W in qt is letter, number, or '_', I want to be a bit less strict
TQRegExp rx(TQString::tqfromLatin1("[^\\w\\s-']"));
- if(text.tqfind(rx) == -1) {
+ if(text.find(rx) == -1) {
// split by whitespace, and add rules for each word
TQStringList tokens = TQStringList::split(TQRegExp(TQString::tqfromLatin1("\\s")), text);
for(TQStringList::Iterator it = tokens.begin(); it != tokens.end(); ++it) {
@@ -2366,7 +2366,7 @@ bool MainWindow::importCollection(Data::CollPtr coll_, Import::Action action_) {
}
break;
- default: // tqreplace
+ default: // replace
Kernel::self()->replaceCollection(coll_);
m_fileOpenRecent->setCurrentItem(-1);
m_newDocument = true;