Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 5f9e8eb2cb
commit af42c31c98

@ -48,8 +48,8 @@ int main(int argc, char *argv[])
TDEApplication app;
KGlobal::locale()->insertCatalogue("ksquirrel");
KGlobal::locale()->setActiveCatalogue("ksquirrel");
TDEGlobal::locale()->insertCatalogue("ksquirrel");
TDEGlobal::locale()->setActiveCatalogue("ksquirrel");
KLC *klc = new KLC(0, App);

@ -1159,7 +1159,7 @@ void KSquirrel::createPostSplash()
hbox->setStretchFactor(pp, 0);
hbox->setStretchFactor(l, 1);
TQRect rc = KGlobalSettings::splashScreenDesktopGeometry();
TQRect rc = TDEGlobalSettings::splashScreenDesktopGeometry();
int w = 200, h = 20;
hbox->setGeometry(rc.center().x() - w/2, rc.center().y() - h/2, w, h);
@ -2077,7 +2077,7 @@ void KSquirrel::slotPluginsDel()
proc << "ksquirrel-libs-configurator";
proc.start(KProcess::DontCare);
proc.start(TDEProcess::DontCare);
}
void KSquirrel::slotPauseSlideShow()

@ -48,8 +48,8 @@ KSquirrelPart::KSquirrelPart(TQWidget *parentWidget, const char *,
ext = new KSquirrelPartBrowserExtension(this);
KGlobal::dirs()->addResourceType("data", KStandardDirs::kde_default("data") + TQString::fromLatin1("ksquirrel"));
KGlobal::locale()->setActiveCatalogue(KSquirrelFactory::instance()->instanceName());
TDEGlobal::dirs()->addResourceType("data", KStandardDirs::kde_default("data") + TQString::fromLatin1("ksquirrel"));
TDEGlobal::locale()->setActiveCatalogue(KSquirrelFactory::instance()->instanceName());
if(!SQ_ErrorString::instance())
new SQ_ErrorString(TQT_TQOBJECT(parentWidget));

@ -239,7 +239,7 @@ void SQ_ExternalTool::slotActivateTool(int id)
}
// start process
proc.start(KProcess::DontCare);
proc.start(TDEProcess::DontCare);
}
#include "sq_externaltool.moc"

@ -87,7 +87,7 @@ void SQ_GLView::slotChanged()
{
TQString result;
static const TQString &line = KGlobal::staticQString(" | ");
static const TQString &line = TDEGlobal::staticQString(" | ");
result.append(map["SBDecoded"]->text());
result.append(line);

@ -1633,9 +1633,9 @@ void SQ_GLWidget::decode()
tab->elapsed = started.elapsed();
#ifndef KSQUIRREL_PART
SQ_GLView::window()->sbarWidget("SBLoaded")->setText(KGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
SQ_GLView::window()->sbarWidget("SBLoaded")->setText(TDEGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
#else
t_glv.sbarWidget("SBLoaded")->setText(KGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
t_glv.sbarWidget("SBLoaded")->setText(TDEGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
#endif
images->setItemChecked(first_id, true);

@ -1325,10 +1325,10 @@ void SQ_GLWidget::slotChangeTab(int id)
#ifndef KSQUIRREL_PART
SQ_GLView::window()->sbarWidget("SBFile")->setText(tab->m_original.fileName(false));
SQ_GLView::window()->sbarWidget("SBLoaded")->setText(KGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
SQ_GLView::window()->sbarWidget("SBLoaded")->setText(TDEGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
#else
t_glv.sbarWidget("SBFile")->setText(tab->m_original.fileName(false));
t_glv.sbarWidget("SBLoaded")->setText(KGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
t_glv.sbarWidget("SBLoaded")->setText(TDEGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
#endif
}
else

@ -40,7 +40,7 @@ SQ_IconLoader::~SQ_IconLoader()
TQPixmap SQ_IconLoader::loadIcon(const TQString& name, KIcon::Group group, int size) const
{
// try to load from installed icon theme
TQPixmap p = KGlobal::iconLoader()->loadIcon(name, group, size, KIcon::DefaultState, 0, true);
TQPixmap p = TDEGlobal::iconLoader()->loadIcon(name, group, size, KIcon::DefaultState, 0, true);
// requested pixmap not found, let's
// try to find it in our pixmaps
@ -61,7 +61,7 @@ TQPixmap SQ_IconLoader::loadIcon(const TQString& name, KIcon::Group group, int s
else if(name == "edit" && size == 32)
p = pixmap_edit;
else
p = KGlobal::iconLoader()->loadIcon("unknown", group, size);
p = TDEGlobal::iconLoader()->loadIcon("unknown", group, size);
}
return p;

@ -150,7 +150,7 @@ int main(int argc, char *argv[])
}
}
KGlobal::dirs()->addResourceType("data", KStandardDirs::kde_default("data") + TQString::fromLatin1("ksquirrel"));
TDEGlobal::dirs()->addResourceType("data", KStandardDirs::kde_default("data") + TQString::fromLatin1("ksquirrel"));
SQ_SplashScreen *splash = 0;

@ -117,7 +117,7 @@ void SQ_CategoryBrowserMenu::initialize()
initIconMap();
// read configuration
KConfig *c = KGlobal::config();
KConfig *c = TDEGlobal::config();
c->setGroup("menus");
_showhidden = c->readBoolEntry("ShowHiddenFiles", false);
_maxentries = c->readNumEntry("MaxEntries2", 30);
@ -202,7 +202,7 @@ void SQ_CategoryBrowserMenu::initialize()
KSimpleConfig c(path + "/.directory", true);
c.setDesktopGroup();
icon = KGlobal::iconLoader()->loadIcon(c.readEntry("Icon"),
icon = TDEGlobal::iconLoader()->loadIcon(c.readEntry("Icon"),
KIcon::Small, KIcon::SizeSmall,
KIcon::DefaultState, 0, true);
if(icon.isNull())
@ -254,7 +254,7 @@ void SQ_CategoryBrowserMenu::initialize()
TQString s = c.readEntry("Icon");
if(!_icons->contains(s)) {
icon = KGlobal::iconLoader()->loadIcon(s, KIcon::Small, KIcon::SizeSmall,
icon = TDEGlobal::iconLoader()->loadIcon(s, KIcon::Small, KIcon::SizeSmall,
KIcon::DefaultState, 0, true);
if(icon.isNull()) {
@ -317,7 +317,7 @@ void SQ_CategoryBrowserMenu::initialize()
// WABA: tear off handles don't work together with dynamically updated
// menus. We can't update the menu while torn off, and we don't know
// when it is torn off.
if(KGlobalSettings::insertTearOffHandle() && item_count > 0)
if(TDEGlobalSettings::insertTearOffHandle() && item_count > 0)
insertTearOffHandle();
#endif

@ -59,7 +59,7 @@ SQ_DBMenu::~SQ_DBMenu()
void SQ_DBMenu::slotChangeIcon()
{
KIconDialog dialog(KGlobal::iconLoader());
KIconDialog dialog(TDEGlobal::iconLoader());
dialog.setup(KIcon::Desktop, KIcon::MimeType, true, KIcon::SizeSmall);
TQString result = dialog.openDialog();
@ -262,7 +262,7 @@ SQ_DirectoryBasket::~SQ_DirectoryBasket()
{
SQ_DirectoryItem *item = static_cast<SQ_DirectoryItem *>(root->root()->firstChild());
static const TQString &nl = KGlobal::staticQString("\n");
static const TQString &nl = TDEGlobal::staticQString("\n");
if(item)
{
@ -288,7 +288,7 @@ SQ_DirectoryBasket::~SQ_DirectoryBasket()
void SQ_DirectoryBasket::slotNewDirectory()
{
static const TQString &nl = KGlobal::staticQString("\n");
static const TQString &nl = TDEGlobal::staticQString("\n");
KURL url = KFileDialog::getExistingURL(TQString(), KSquirrel::app());
@ -406,7 +406,7 @@ void SQ_DirectoryBasket::slotContextMenu(KListView *, TQListViewItem *item, cons
void SQ_DirectoryBasket::add(const KFileItemList &list)
{
static const TQString &nl = KGlobal::staticQString("\n");
static const TQString &nl = TDEGlobal::staticQString("\n");
KFileItemListIterator it(list);
KFileItem *fi;
@ -511,7 +511,7 @@ void SQ_DirectoryBasket::slotDelayedShowAdd()
{
int w = 200, h = 32;
TQRect rc = KGlobalSettings::splashScreenDesktopGeometry();
TQRect rc = TDEGlobalSettings::splashScreenDesktopGeometry();
progressAdd->setGeometry(rc.center().x() - w/2, rc.center().y() - h/2, w, h);
progressAdd->show();

@ -114,7 +114,7 @@ void SQ_ImageBasket::insertNewFiles(const KFileItemList &list)
TQString mime = KMimeType::findByURL(url)->name();
tmp->setMimeType(mime);
static const TQString &nl = KGlobal::staticQString("\n");
static const TQString &nl = TDEGlobal::staticQString("\n");
TQString inurl = url.prettyURL() + nl + mime;
@ -130,7 +130,7 @@ void SQ_ImageBasket::insertNewFiles(const KFileItemList &list)
void SQ_ImageBasket::add(const KFileItemList &list)
{
KFileItem *tmp;
static const TQString &nl = KGlobal::staticQString("\n");
static const TQString &nl = TDEGlobal::staticQString("\n");
for(KFileItemListIterator it(list); (tmp = it.current()); ++it)
{
@ -149,7 +149,7 @@ void SQ_ImageBasket::slotDropped(const KFileItem *, TQDropEvent*, const KURL::Li
{
TQString name;
KURL::List::const_iterator itEnd = list.end();
static const TQString &nl = KGlobal::staticQString("\n");
static const TQString &nl = TDEGlobal::staticQString("\n");
for(KURL::List::const_iterator it = list.begin();it != itEnd;++it)
{

@ -79,7 +79,7 @@ void SQ_MultiBar::addWidget(TQWidget *new_w, const TQString &text, const TQStrin
stack->addWidget(new_w, m_id);
// add button
mt->appendTab(KGlobal::iconLoader()->loadIcon(icon, KIcon::Desktop, 22), m_id, text);
mt->appendTab(TDEGlobal::iconLoader()->loadIcon(icon, KIcon::Desktop, 22), m_id, text);
// since we cann't determine which tab was clicked,
// we should use TQSignalMapper to determine it.

@ -54,8 +54,8 @@ void SQ_ThreadDirLister::run()
TQFileInfo fi;
bool b_read;
static const TQString &dot = KGlobal::staticQString(".");
static const TQString &dotdot = KGlobal::staticQString("..");
static const TQString &dot = TDEGlobal::staticQString(".");
static const TQString &dotdot = TDEGlobal::staticQString("..");
while(true)
{

@ -140,8 +140,8 @@ void SQ_TreeViewMenu::slotEntries(KIO::Job *, const KIO::UDSEntryList &list)
TQString suff;
KURL u;
static const TQString &dot = KGlobal::staticQString(".");
static const TQString &dotdot = KGlobal::staticQString("..");
static const TQString &dot = TDEGlobal::staticQString(".");
static const TQString &dotdot = TDEGlobal::staticQString("..");
// go through list of KIO::UDSEntrys
for(KIO::UDSEntryListConstIterator it = list.begin(); it != itEnd; ++it)

@ -35,7 +35,7 @@ SQ_ArchiveHandler::~SQ_ArchiveHandler()
void SQ_ArchiveHandler::fillProtocols()
{
// search for tar protocol
if(!KGlobal::dirs()->findResource("services", "tar.protocol").isEmpty())
if(!TDEGlobal::dirs()->findResource("services", "tar.protocol").isEmpty())
{
insert("application/x-tgz", "tar");
insert("application/x-tar", "tar");
@ -46,27 +46,27 @@ void SQ_ArchiveHandler::fillProtocols()
// search for rar protocol (kio_rar from
// http://kde-apps.org/content/show.php/kio_rar?content=17527)
if(!KGlobal::dirs()->findResource("services", "rar.protocol").isEmpty())
if(!TDEGlobal::dirs()->findResource("services", "rar.protocol").isEmpty())
{
insert("application/x-rar", "rar");
insert("application/x-rar-compressed", "rar");
}
// search for ar protocol
if(!KGlobal::dirs()->findResource("services", "ar.protocol").isEmpty())
if(!TDEGlobal::dirs()->findResource("services", "ar.protocol").isEmpty())
insert("application/x-archive", "ar");
// search for iso protocol
if(!KGlobal::dirs()->findResource("services", "iso.protocol").isEmpty())
if(!TDEGlobal::dirs()->findResource("services", "iso.protocol").isEmpty())
insert("application/x-iso", "iso");
// search for zip protocol
if(!KGlobal::dirs()->findResource("services", "zip.protocol").isEmpty())
if(!TDEGlobal::dirs()->findResource("services", "zip.protocol").isEmpty())
insert("application/x-zip", "zip");
// search for 7zip protocol (kio_p7zip
// from http://kde-apps.org/content/show.php/kio_p7zip?content=17829)
if(!KGlobal::dirs()->findResource("services", "p7zip.protocol").isEmpty())
if(!TDEGlobal::dirs()->findResource("services", "p7zip.protocol").isEmpty())
insert("application/x-7z", "p7zip");
}

@ -239,7 +239,7 @@ void SQ_ExternalTool::slotActivateTool(int id)
}
// start process
proc.start(KProcess::DontCare);
proc.start(TDEProcess::DontCare);
}
#include "sq_externaltool.moc"

@ -127,7 +127,7 @@ void SQ_ExternalTools::slotToolRenameRequest( TQListViewItem *item, const TQPoin
item->startRename(pos);
else
{
KIconDialog dialog(KGlobal::iconLoader());
KIconDialog dialog(TDEGlobal::iconLoader());
dialog.setup(KIcon::Desktop, KIcon::Application, true, 16);
TQString result = dialog.openDialog();

@ -188,7 +188,7 @@ void SQ_FileDetailView::dragEnterEvent(TQDragEnterEvent *e)
*/
void SQ_FileDetailView::insertCdUpItem(const KURL &base)
{
static const TQString &dirup = KGlobal::staticQString("..");
static const TQString &dirup = TDEGlobal::staticQString("..");
KFileItem *fi = new KFileItem(base.upURL(), "inode/directory", S_IFDIR);

@ -98,7 +98,7 @@ void SQ_FileIconView::insertItem(KFileItem *i)
*/
void SQ_FileIconView::insertCdUpItem(const KURL &base)
{
static const TQString &dirup = KGlobal::staticQString("..");
static const TQString &dirup = TDEGlobal::staticQString("..");
KFileItem *fi = new KFileItem(base.upURL(), "inode/directory", S_IFDIR);

@ -432,7 +432,7 @@ bool SQ_FileThumbView::updateRunning() const
*/
void SQ_FileThumbView::insertCdUpItem(const KURL &base)
{
static const TQString &dirup = KGlobal::staticQString("..");
static const TQString &dirup = TDEGlobal::staticQString("..");
KFileItem *fi = new KFileItem(base.upURL(), "inode/directory", S_IFDIR);

@ -1633,9 +1633,9 @@ void SQ_GLWidget::decode()
tab->elapsed = started.elapsed();
#ifndef KSQUIRREL_PART
SQ_GLView::window()->sbarWidget("SBLoaded")->setText(KGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
SQ_GLView::window()->sbarWidget("SBLoaded")->setText(TDEGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
#else
t_glv.sbarWidget("SBLoaded")->setText(KGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
t_glv.sbarWidget("SBLoaded")->setText(TDEGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
#endif
images->setItemChecked(first_id, true);

@ -1325,10 +1325,10 @@ void SQ_GLWidget::slotChangeTab(int id)
#ifndef KSQUIRREL_PART
SQ_GLView::window()->sbarWidget("SBFile")->setText(tab->m_original.fileName(false));
SQ_GLView::window()->sbarWidget("SBLoaded")->setText(KGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
SQ_GLView::window()->sbarWidget("SBLoaded")->setText(TDEGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
#else
t_glv.sbarWidget("SBFile")->setText(tab->m_original.fileName(false));
t_glv.sbarWidget("SBLoaded")->setText(KGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
t_glv.sbarWidget("SBLoaded")->setText(TDEGlobal::locale()->formatLong(tab->elapsed) + i18n(" ms."));
#endif
}
else

@ -40,7 +40,7 @@ SQ_IconLoader::~SQ_IconLoader()
TQPixmap SQ_IconLoader::loadIcon(const TQString& name, KIcon::Group group, int size) const
{
// try to load from installed icon theme
TQPixmap p = KGlobal::iconLoader()->loadIcon(name, group, size, KIcon::DefaultState, 0, true);
TQPixmap p = TDEGlobal::iconLoader()->loadIcon(name, group, size, KIcon::DefaultState, 0, true);
// requested pixmap not found, let's
// try to find it in our pixmaps
@ -61,7 +61,7 @@ TQPixmap SQ_IconLoader::loadIcon(const TQString& name, KIcon::Group group, int s
else if(name == "edit" && size == 32)
p = pixmap_edit;
else
p = KGlobal::iconLoader()->loadIcon("unknown", group, size);
p = TDEGlobal::iconLoader()->loadIcon("unknown", group, size);
}
return p;

@ -45,7 +45,7 @@ void SQ_Progress::setTotalSteps(int totalSteps)
percentage = 0;
if(!color.isValid())
color = KGlobalSettings::highlightColor();
color = TDEGlobalSettings::highlightColor();
painter = new TQPainter(this);
painter->setBrush(color);
@ -56,7 +56,7 @@ void SQ_Progress::setTotalSteps(int totalSteps)
painter->setFont(f);
painter->setPen(color);
painter->setBrush(KGlobalSettings::baseColor());
painter->setBrush(TDEGlobalSettings::baseColor());
painter->drawRect(rect());
}
@ -118,7 +118,7 @@ void SQ_Progress::drawProgress()
// reset clip rectangle
painter->setClipRect(0, 0, width(), height());
painter->setPen(color);
painter->setBrush(KGlobalSettings::baseColor());
painter->setBrush(TDEGlobalSettings::baseColor());
painter->drawRect(rect());
// draw rectangle
@ -127,10 +127,10 @@ void SQ_Progress::drawProgress()
if(m_text)
{
// draw percentage value
painter->setPen(KGlobalSettings::highlightedTextColor());
painter->setPen(TDEGlobalSettings::highlightedTextColor());
painter->setClipRect(0, 0, np, height());
painter->drawText(rect(), TQt::AlignCenter | TQt::SingleLine, TQString::number(percentage) + '%');
painter->setPen(KGlobalSettings::textColor());
painter->setPen(TDEGlobalSettings::textColor());
painter->setClipRect(np, 0, width()-np, height());
painter->drawText(rect(), TQt::AlignCenter | TQt::SingleLine, TQString::number(percentage) + '%');
}

@ -131,7 +131,7 @@ void SQ_SlideShowWidget::beginSlideShow(int totl)
message->setPaletteBackgroundColor(bgcolor);
show();
setGeometry(KGlobalSettings::desktopGeometry(KSquirrel::app()));
setGeometry(TDEGlobalSettings::desktopGeometry(KSquirrel::app()));
message->hide();
options->hide();

@ -64,7 +64,7 @@ SQ_SplashScreen::SQ_SplashScreen(TQWidget * parent, const char *name)
setPaletteBackgroundPixmap(pix);
TQRect rc = KGlobalSettings::splashScreenDesktopGeometry();
TQRect rc = TDEGlobalSettings::splashScreenDesktopGeometry();
move(rc.center().x() - pix.width()/2, rc.center().y() - pix.height()/2);
setFixedWidth(pix.width());

@ -60,7 +60,7 @@
SQ_ThumbnailLoadJob::SQ_ThumbnailLoadJob(const KFileItemList &items, SQ_FileThumbView *parnt)
: KIO::Job(false), parent(parnt)
{
mBrokenThumbnail.thumbnail = KGlobal::iconLoader()->loadIcon("file_broken", KIcon::Desktop, SQ_ThumbnailSize::smallest());
mBrokenThumbnail.thumbnail = TDEGlobal::iconLoader()->loadIcon("file_broken", KIcon::Desktop, SQ_ThumbnailSize::smallest());
mItems = items;
donothing = false;

Loading…
Cancel
Save