Rename KLocale to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 6065bc4491
commit 805781daef

@ -43,7 +43,7 @@ static KCmdLineOptions options[] =
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
KLocale::setMainCatalogue("tdelibs"); TDELocale::setMainCatalogue("tdelibs");
TDEAboutData aboutData( "kcolorchooser", I18N_NOOP("KColorChooser"), TDEAboutData aboutData( "kcolorchooser", I18N_NOOP("KColorChooser"),
version, description, TDEAboutData::License_BSD, version, description, TDEAboutData::License_BSD,
"(c) 2000, Waldo Bastian"); "(c) 2000, Waldo Bastian");

@ -110,7 +110,7 @@ namespace {
// FIXME: this ignores the timezone // FIXME: this ignores the timezone
TQDate date( year, month, day ); TQDate date( year, month, day );
TQTime time( hour, min, sec ); TQTime time( hour, min, sec );
KLocale locale( "kghostview" ); TDELocale locale( "kghostview" );
return locale.formatDateTime( TQDateTime( date, time ) ); return locale.formatDateTime( TQDateTime( date, time ) );
} }
kdDebug( 4500 ) << "parseDate failed." << endl; kdDebug( 4500 ) << "parseDate failed." << endl;

@ -61,7 +61,7 @@ KGVMiniWidget::KGVMiniWidget( KGVPart* part, const char* name ) :
_usePageLabels( true ), _usePageLabels( true ),
_visiblePage( -1 ) _visiblePage( -1 )
{ {
KLocale locale( "kghostview" ); TDELocale locale( "kghostview" );
_fallBackPageMedia = pageSizeToString( _fallBackPageMedia = pageSizeToString(
static_cast< TQPrinter::PageSize >( locale.pageSize() ) ); static_cast< TQPrinter::PageSize >( locale.pageSize() ) );
_thumbnailService = new ThumbnailService( this ); _thumbnailService = new ThumbnailService( this );

@ -38,7 +38,7 @@
extern "C" { extern "C" {
KDE_EXPORT int kdemain( int argc, char **argv ) KDE_EXPORT int kdemain( int argc, char **argv )
{ {
KLocale::setMainCatalogue("tdelibs"); TDELocale::setMainCatalogue("tdelibs");
TDEInstance instance( "tdeio_mrml" ); TDEInstance instance( "tdeio_mrml" );
TDEGlobal::locale()->insertCatalogue( "kmrml" ); TDEGlobal::locale()->insertCatalogue( "kmrml" );

@ -100,7 +100,7 @@ EngineError KadmosDialog::findClassifiers()
{ {
findClassifierPath(); findClassifierPath();
KLocale *locale = TDEGlobal::locale(); TDELocale *locale = TDEGlobal::locale();
TQStringList allCountries = locale->allLanguagesTwoAlpha (); TQStringList allCountries = locale->allLanguagesTwoAlpha ();
for ( TQStringList::Iterator it = allCountries.begin(); for ( TQStringList::Iterator it = allCountries.begin();
it != allCountries.end(); ++it ) it != allCountries.end(); ++it )
@ -289,7 +289,7 @@ EngineError KadmosDialog::setupGui()
m_cbLang = new TQComboBox( m_gbLang ); m_cbLang = new TQComboBox( m_gbLang );
m_cbLang->setCurrentText( KLocale::defaultCountry() ); m_cbLang->setCurrentText( TDELocale::defaultCountry() );
connect( m_bbFont, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slFontChanged(int) )); connect( m_bbFont, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slFontChanged(int) ));
m_rbMachine->setChecked(true); m_rbMachine->setChecked(true);

@ -419,7 +419,7 @@ TQString KViewPart::pageSizeDescription()
TQString size = " "; TQString size = " ";
if (s.formatNumber() == -1) { if (s.formatNumber() == -1) {
if (TDEGlobal::locale()-> measureSystem() == KLocale::Metric) if (TDEGlobal::locale()-> measureSystem() == TDELocale::Metric)
size += TQString("%1x%2 mm").arg(s.width().getLength_in_mm(), 0, 'f', 0).arg(s.height().getLength_in_mm(), 0, 'f', 0); size += TQString("%1x%2 mm").arg(s.width().getLength_in_mm(), 0, 'f', 0).arg(s.height().getLength_in_mm(), 0, 'f', 0);
else else
size += TQString("%1x%2 in").arg(s.width().getLength_in_inch(), 0, 'g', 2).arg(s.height().getLength_in_inch(), 0, 'g', 2); size += TQString("%1x%2 in").arg(s.width().getLength_in_inch(), 0, 'g', 2).arg(s.height().getLength_in_inch(), 0, 'g', 2);

@ -210,7 +210,7 @@ TQString pageSize::preferredUnit() const
return staticList[currentSize].preferredUnit; return staticList[currentSize].preferredUnit;
// User-defined size. Give a preferred unit depening on the locale. // User-defined size. Give a preferred unit depening on the locale.
if (TDEGlobal::locale()-> measureSystem() == KLocale::Metric) if (TDEGlobal::locale()-> measureSystem() == TDELocale::Metric)
return "mm"; return "mm";
else else
return "in"; return "in";
@ -333,7 +333,7 @@ int pageSize::defaultPageSize()
// FIXME: static_cast<TQPrinter::PageSize>(TDEGlobal::locale()->pageSize()) // FIXME: static_cast<TQPrinter::PageSize>(TDEGlobal::locale()->pageSize())
// is the proper solution here. Then you can determine the values // is the proper solution here. Then you can determine the values
// without using your hardcoded table too! // without using your hardcoded table too!
if (TDEGlobal::locale()-> measureSystem() == KLocale::Metric) if (TDEGlobal::locale()-> measureSystem() == TDELocale::Metric)
return defaultMetricPaperSize; return defaultMetricPaperSize;
else else
return defaultImperialPaperSize; return defaultImperialPaperSize;

Loading…
Cancel
Save