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

master
Timothy Pearson 11 years ago
parent 9e1442a361
commit b4e45bde66

@ -68,7 +68,7 @@ TQString FileCache::tempDir()
KTempDir * FileCache::createTempDir()
{
TQString tmpName = TQString::fromLatin1( KGlobal::instance()->instanceName() );
TQString tmpName = TQString::fromLatin1( TDEGlobal::instance()->instanceName() );
tmpName.append( TQString::number( getpid() ) );
TQString dirName = locateLocal( "tmp", tmpName );
KTempDir *dir = new KTempDir( dirName );

@ -52,16 +52,16 @@ FileFinder::FileFinder( TQWidget *parent, const char *name )
setAutoDeleteCompletionObject( true );
setFocusPolicy( TQ_ClickFocus );
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
KConfigGroupSaver cs( config, "GeneralConfiguration" );
setCompletionMode( (KGlobalSettings::Completion)
setCompletionMode( (TDEGlobalSettings::Completion)
config->readNumEntry( "FileFinderCompletionMode",
KGlobalSettings::completionMode()));
TDEGlobalSettings::completionMode()));
}
FileFinder::~FileFinder()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
KConfigGroupSaver cs( config, "GeneralConfiguration" );
config->writeEntry( "FileFinderCompletionMode", completionMode() );
}

@ -43,16 +43,16 @@ FileWidget::FileWidget( const KURL& url, TQWidget *parent, const char *name )
setEnableDirHighlighting( true );
#if TDE_VERSION >= 310
setViewConfig( KGlobal::config(), "Filebrowser" );
setViewConfig( TDEGlobal::config(), "Filebrowser" );
#endif
readConfig( KGlobal::config(), "Filebrowser" );
readConfig( TDEGlobal::config(), "Filebrowser" );
setView( KFile::Default );
// setOnlyDoubleClickSelectsFiles( true );
reloadConfiguration();
completionObject()->setCompletionMode( KGlobalSettings::CompletionAuto );
dirCompletionObject()->setCompletionMode( KGlobalSettings::CompletionAuto);
completionObject()->setCompletionMode( TDEGlobalSettings::CompletionAuto );
dirCompletionObject()->setCompletionMode( TDEGlobalSettings::CompletionAuto);
slotViewChanged();
connect( this, TQT_SIGNAL( viewChanged( KFileView * )),
@ -155,8 +155,8 @@ void FileWidget::findCompletion( const TQString& text )
text.find('/') != -1 ) {
TQString t = m_fileFinder->completion()->makeCompletion( text );
if (m_fileFinder->completionMode() == KGlobalSettings::CompletionPopup ||
m_fileFinder->completionMode() == KGlobalSettings::CompletionPopupAuto)
if (m_fileFinder->completionMode() == TDEGlobalSettings::CompletionPopup ||
m_fileFinder->completionMode() == TDEGlobalSettings::CompletionPopupAuto)
m_fileFinder->setCompletedItems(
m_fileFinder->completion()->allMatches() );
else

@ -321,7 +321,7 @@ void ImageWindow::centerImage()
int w, h;
if ( myIsFullscreen )
{
TQRect desktopRect = KGlobalSettings::desktopGeometry( this );
TQRect desktopRect = TDEGlobalSettings::desktopGeometry( this );
w = desktopRect.width();
h = desktopRect.height();
}
@ -1128,7 +1128,7 @@ int ImageWindow::desktopWidth( bool totalScreen ) const
{
if ( myIsFullscreen || totalScreen )
{
return KGlobalSettings::desktopGeometry(topLevelWidget()).width();
return TDEGlobalSettings::desktopGeometry(topLevelWidget()).width();
} else
return Kuick::workArea().width();
}
@ -1137,7 +1137,7 @@ int ImageWindow::desktopWidth( bool totalScreen ) const
int ImageWindow::desktopHeight( bool totalScreen ) const
{
if ( myIsFullscreen || totalScreen ) {
return KGlobalSettings::desktopGeometry(topLevelWidget()).height();
return TDEGlobalSettings::desktopGeometry(topLevelWidget()).height();
} else {
return Kuick::workArea().height();
}
@ -1146,7 +1146,7 @@ int ImageWindow::desktopHeight( bool totalScreen ) const
TQSize ImageWindow::maxImageSize() const
{
if ( myIsFullscreen ) {
return KGlobalSettings::desktopGeometry(topLevelWidget()).size();
return TDEGlobalSettings::desktopGeometry(topLevelWidget()).size();
}
else {
return Kuick::workArea().size() - Kuick::frameSize( winId() );
@ -1193,7 +1193,7 @@ bool ImageWindow::canZoomTo( int newWidth, int newHeight )
if ( !ImlibWidget::canZoomTo( newWidth, newHeight ) )
return false;
TQSize desktopSize = KGlobalSettings::desktopGeometry(topLevelWidget()).size();
TQSize desktopSize = TDEGlobalSettings::desktopGeometry(topLevelWidget()).size();
int desktopArea = desktopSize.width() * desktopSize.height();
int imageArea = newWidth * newHeight;

@ -81,7 +81,7 @@ void KuickConfigDialog::applyConfig()
imageKeyChooser->save();
browserKeyChooser->save();
KGlobal::config()->sync();
TDEGlobal::config()->sync();
}

@ -70,7 +70,7 @@ KuickData::~KuickData()
void KuickData::load()
{
KConfig *kc = KGlobal::config();
KConfig *kc = TDEGlobal::config();
KuickData def;
@ -134,7 +134,7 @@ void KuickData::load()
void KuickData::save()
{
KConfig *kc = KGlobal::config();
KConfig *kc = TDEGlobal::config();
kc->setGroup( "GeneralConfiguration" );
kc->writeEntry( "FileFilter", fileFilter );

@ -114,7 +114,7 @@ KuickShow::KuickShow( const char *name )
connect( m_slideTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( nextSlide() ));
KConfig *kc = KGlobal::config();
KConfig *kc = TDEGlobal::config();
bool isDir = false; // true if we get a directory on the commandline
@ -253,7 +253,7 @@ void KuickShow::initGUI( const KURL& startDir )
coll, "kuick_print" );
print->setText( i18n("Print Image...") );
KAction *configure = new KAction( i18n("Configure %1...").arg( KGlobal::instance()->aboutData()->programName() ), "configure",
KAction *configure = new KAction( i18n("Configure %1...").arg( TDEGlobal::instance()->aboutData()->programName() ), "configure",
KShortcut(),
TQT_TQOBJECT(this), TQT_SLOT( configuration() ),
coll, "kuick_configure" );
@ -374,7 +374,7 @@ void KuickShow::initGUI( const KURL& startDir )
fileWidget->setFocus();
KConfig *kc = KGlobal::config();
KConfig *kc = TDEGlobal::config();
kc->setGroup("SessionSettings");
bool oneWindow = kc->readBoolEntry("OpenImagesInActiveWindow", true );
oneWindowAction->setChecked( oneWindow );
@ -1197,7 +1197,7 @@ void KuickShow::saveProperties( KConfig *kc )
void KuickShow::saveSettings()
{
KConfig *kc = KGlobal::config();
KConfig *kc = TDEGlobal::config();
kc->setGroup("SessionSettings");
if ( oneWindowAction )

@ -82,7 +82,7 @@ bool Printing::printImageWithTQt( const TQString& filename, KPrinter& printer,
p.begin( &printer );
TQPaintDeviceMetrics metrics( &printer );
p.setFont( KGlobalSettings::generalFont() );
p.setFont( TDEGlobalSettings::generalFont() );
TQFontMetrics fm = p.fontMetrics();
int w = metrics.width();

Loading…
Cancel
Save