Added controlled conversions to char* instead of automatic ascii conversions.

The definition of -UTQT_NO_ASCII_CAST is no longer needed.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 2c73ccdf45)
r14.0.x
Slávek Banko 4 years ago
parent 26de10618a
commit aca58384d9
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -62,7 +62,7 @@ include( ConfigureChecks.cmake )
###### global compiler settings
add_definitions( -DHAVE_CONFIG_H -UQT_NO_ASCII_CAST )
add_definitions( -DHAVE_CONFIG_H )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )

@ -517,8 +517,8 @@ bool RegisterState::operator == ( const RegisterState & state ) const
void RegisterState::print()
{
cout << " known="<<binary(known)<<endl;
cout << " value="<<binary(value)<<endl;
cout << " known=" << binary(known).local8Bit() << endl;
cout << " value=" << binary(value).local8Bit() << endl;
}
//END class RegisterState
@ -714,7 +714,7 @@ void ProcessorState::print()
RegisterMap::iterator end = m_registers.end();
for ( RegisterMap::iterator it = m_registers.begin(); it != end; ++it )
{
cout << " " << it.key().name() << ":\n";
cout << " " << it.key().name().local8Bit() << ":\n";
it.data().print();
}
}

@ -64,14 +64,14 @@ int main(int argc, char **argv)
if ( !errorReport.isEmpty() )
{
cerr << mb.errorReport();
cerr << mb.errorReport().local8Bit();
return 1; // If there was an error, don't write the output to file.
}
else
{
ofstream out(args->arg(1));
out << s;
out << s.local8Bit();
return 0;
}
}

@ -135,7 +135,7 @@ PIC14::Type PIC14::toType( const TQString & _text )
if ( text == "16F628" )
return P16F628;
cerr << TQString("%1 is not a known PIC identifier\n").arg(_text);
cerr << TQString("%1 is not a known PIC identifier\n").arg(_text).local8Bit();
return unknown;
}

@ -811,7 +811,7 @@ void ItemDocument::exportToImage()
// we need an object so we can retrieve which image type was selected by the user
// so setup the filedialog.
KFileDialog exportDialog(TQString(), "*.png|PNG Image\n*.bmp|BMP Image\n*.svg|SVG Image" , p_ktechlab, i18n("Export As Image"), true, cropCheck);
KFileDialog exportDialog(TQString(), "*.png|PNG Image\n*.bmp|BMP Image\n*.svg|SVG Image" , p_ktechlab, i18n("Export As Image").utf8(), true, cropCheck);
exportDialog.setOperationMode( KFileDialog::Saving );
// now actually show it
@ -911,21 +911,25 @@ void ItemDocument::exportToImage()
if ( cropCheck->isChecked() )
{
if( type == "SVG" )
saveResult = dynamic_cast<TQPicture*>(outputImage)->save( url.path(), type);
saveResult = dynamic_cast<TQPicture*>(outputImage)->save(url.path(), type.utf8());
else
{
TQImage img = dynamic_cast<TQPixmap*>(outputImage)->convertToImage();
img = img.copy(cropArea);
saveResult = img.save(url.path(),type);
saveResult = img.save(url.path(), type.utf8());
}
}
else
{
if ( type=="SVG" )
saveResult = dynamic_cast<TQPicture*>(outputImage)->save( url.path(), type );
{
saveResult = dynamic_cast<TQPicture*>(outputImage)->save(url.path(), type.utf8());
}
else
saveResult = dynamic_cast<TQPixmap*>(outputImage)->save( url.path(), type );
{
saveResult = dynamic_cast<TQPixmap*>(outputImage)->save(url.path(), type.utf8());
}
}
//if(saveResult == true) KMessageBox::information( this, i18n("Sucessfully exported to \"%1\"").arg( url.filename() ), i18n("Image Export") );

@ -683,7 +683,7 @@ void ItemDocumentData::elementToConnectorData( TQDomElement element )
ConnectorData connectorData;
connectorData.manualRoute = element.attribute( "manual-route", "0" );
connectorData.manualRoute = element.attribute("manual-route", "0").toInt();
TQString route = element.attribute( "route", "" );
TQStringList points = TQStringList::split( ",", route );
@ -992,7 +992,7 @@ void ItemDocumentData::mergeWithDocument( ItemDocument *itemDocument, bool selec
{
if ( !it.data().type.isEmpty() && !itemDocument->itemWithID( it.key() ) )
{
Item *item = itemLibrary()->createItem( it.data().type, itemDocument, false, it.key(), false );
Item *item = itemLibrary()->createItem(it.data().type, itemDocument, false, it.key().utf8(), false);
if ( item && !itemDocument->isValidItem(item) )
{
kdWarning() << "Attempted to create invalid item with id: " << it.key() << endl;

@ -592,7 +592,7 @@ void KTechlab::slotDragContextActivated( int id )
TDEAction * KTechlab::action( const TQString & name ) const
{
TDEAction * action = actionCollection()->action(name);
TDEAction * action = actionCollection()->action(name.utf8());
if ( !action )
kdError() << k_funcinfo << "No such action: " << name << endl;
return action;

@ -27,7 +27,7 @@
//BEGIN class Language
Language::Language( ProcessChain *processChain, KTechlab *parent, const TQString &name )
: TQObject(parent,name)
: TQObject(parent, name.utf8())
{
p_ktechlab = parent;
p_processChain = processChain;

@ -605,7 +605,7 @@ void TextDocument::slotUpdateMarksInfo()
{
TDEAction * a = new TDEAction( i18n("%1 - %2").arg( TQString::number( mark->line+1 ) ).arg( m_doc->textLine(mark->line) ),
0, this, TQT_SLOT(slotBookmarkRequested()), this,
TQString("bookmark_%1").arg(TQString::number(mark->line).ascii()) );
TQString("bookmark_%1").arg(TQString::number(mark->line)).latin1() );
m_bookmarkActions.append(a);
}
}

@ -61,7 +61,7 @@ class KVSSBSep : public TQWidget {
//BEGIN class View
View::View( Document *document, ViewContainer *viewContainer, uint viewAreaId, const char *name )
: TQWidget( viewContainer->viewArea(viewAreaId), name ? name : (const char *)("view_" + TQString::number(viewAreaId)) ),
: TQWidget( viewContainer->viewArea(viewAreaId), name ? name : TQString("view_%1").arg(TQString::number(viewAreaId)).latin1() ),
KXMLGUIClient()
{
m_dcopID = 0;
@ -103,7 +103,7 @@ View::~View()
TDEAction * View::action( const TQString & name ) const
{
TDEAction * action = actionCollection()->action(name);
TDEAction * action = actionCollection()->action(name.utf8());
if ( !action )
kdError() << k_funcinfo << "No such action: " << name << endl;
return action;

@ -412,8 +412,8 @@ ViewArea *ViewArea::createViewArea( Position position, uint id )
setOrientation( ( position == Right ) ? Qt::Horizontal : Qt::Vertical );
p_viewArea1 = new ViewArea( this, p_viewContainer, m_id, (const char*)("viewarea_"+TQString::number(m_id)) );
p_viewArea2 = new ViewArea( this, p_viewContainer, id, (const char*)("viewarea_"+TQString::number(id)) );
p_viewArea1 = new ViewArea(this, p_viewContainer, m_id, TQString("viewarea_%1").arg(TQString::number(m_id)).latin1());
p_viewArea2 = new ViewArea(this, p_viewContainer, id, TQString("viewarea_%1").arg(TQString::number(id)).latin1());
connect( p_viewArea1, TQT_SIGNAL(destroyed(TQObject* )), this, TQT_SLOT(viewAreaDestroyed(TQObject* )) );
connect( p_viewArea2, TQT_SIGNAL(destroyed(TQObject* )), this, TQT_SLOT(viewAreaDestroyed(TQObject* )) );
@ -559,7 +559,7 @@ void ViewArea::restoreState( TDEConfig *config, int id, const TQString &groupNam
if ( contains.size() >= 1 )
{
int viewArea1Id = contains[0];
p_viewArea1 = new ViewArea( this, p_viewContainer, viewArea1Id, (const char*)("viewarea_"+TQString::number(viewArea1Id)) );
p_viewArea1 = new ViewArea(this, p_viewContainer, viewArea1Id, TQString("viewarea_%1").arg(TQString::number(viewArea1Id)).latin1());
connect( p_viewArea1, TQT_SIGNAL(destroyed(TQObject* )), this, TQT_SLOT(viewAreaDestroyed(TQObject* )) );
p_viewArea1->restoreState( config, viewArea1Id, groupName );
p_viewArea1->show();
@ -568,7 +568,7 @@ void ViewArea::restoreState( TDEConfig *config, int id, const TQString &groupNam
if ( contains.size() >= 2 )
{
int viewArea2Id = contains[1];
p_viewArea2 = new ViewArea( this, p_viewContainer, viewArea2Id, (const char*)("viewarea_"+TQString::number(viewArea2Id)) );
p_viewArea2 = new ViewArea(this, p_viewContainer, viewArea2Id, TQString("viewarea_%1").arg(TQString::number(viewArea2Id)).latin1());
connect( p_viewArea2, TQT_SIGNAL(destroyed(TQObject* )), this, TQT_SLOT(viewAreaDestroyed(TQObject* )) );
p_viewArea2->restoreState( config, viewArea2Id, groupName );
p_viewArea2->show();

Loading…
Cancel
Save