Commit 41921127 authored by Laurent Montel's avatar Laurent Montel 😁

Adapt to new KWarning/kFatal/kDebug api

svn path=/trunk/KDE/kdeedu/kmplot/; revision=695800
parent a73e0b8a
......@@ -143,7 +143,7 @@ QString PlotAppearance::penStyleToString( Qt::PenStyle style )
break;
}
kWarning() << k_funcinfo << "Unknown style " << style << endl;
kWarning() << k_funcinfo << "Unknown style " << style ;
return "SolidLine";
}
......@@ -168,7 +168,7 @@ Qt::PenStyle PlotAppearance::stringToPenStyle( const QString & style )
if ( style == "DashDotDotLine" )
return Qt::DashDotDotLine;
kWarning() << k_funcinfo << "Unknown style " << style << endl;
kWarning() << k_funcinfo << "Unknown style " << style ;
return Qt::SolidLine;
}
//END class PlotAppearance
......@@ -486,7 +486,7 @@ bool Equation::setFstr( const QString & fstr, int * error, int * errorPosition,
} \
else \
{ \
kDebug() << "fstr "<<fstr<<" invalid, but forcing anyway: " << Parser::errorString( Parser::Error(*error) ) << " at position " << *errorPosition << endl; \
kDebug() << "fstr "<<fstr<<" invalid, but forcing anyway: " << Parser::errorString( Parser::Error(*error) ) << " at position " << *errorPosition; \
mem.clear(); \
}
......@@ -744,7 +744,7 @@ QString Function::typeToString( Type type )
return "differential";
}
kWarning() << "Unknown type " << type << endl;
kWarning() << "Unknown type " << type ;
return "unknown";
}
......@@ -766,7 +766,7 @@ Function::Type Function::stringToType( const QString & type )
if ( type == "differential" )
return Differential;
kWarning() << "Unknown type " << type << endl;
kWarning() << "Unknown type " << type ;
return Cartesian;
}
......
......@@ -801,7 +801,7 @@ void FunctionListWidget::dropEvent( QDropEvent * event )
if ( n.nodeName() == "function" )
io.parseFunction( n.toElement(), true );
else
kWarning() << k_funcinfo << "Unexpected node with name " << n.nodeName() << endl;
kWarning() << k_funcinfo << "Unexpected node with name " << n.nodeName() ;
}
}
//END class FunctionListWidget
......
......@@ -70,7 +70,7 @@ void KmPlotProgress::showProgressBar()
void KmPlotProgress::setProgress( double progress )
{
kDebug() << k_funcinfo << "progress="<<progress<<endl;
kDebug() << k_funcinfo << "progress="<<progress;
Q_ASSERT( progress >= 0 );
......
......@@ -314,7 +314,7 @@ void KParameterEditor::cmdExport_clicked()
else
{
QFile file;
kDebug() << "url.path()="<<url.path()<<endl;
kDebug() << "url.path()="<<url.path();
file.setFileName(url.path());
if (file.open( QIODevice::WriteOnly ) )
{
......
......@@ -140,7 +140,7 @@ MainDlg::MainDlg(QWidget *parentWidget, QObject *parent, const QStringList& ) :
// we need an instance
setComponentData( KmPlotPartFactory::componentData() );
kDebug() << "parentWidget->objectName():" << parentWidget->objectName() << endl;
kDebug() << "parentWidget->objectName():" << parentWidget->objectName();
if ( QString(parentWidget->objectName()).startsWith("KmPlot") )
{
setXMLFile("kmplot_part.rc");
......@@ -360,7 +360,7 @@ void MainDlg::setupActions()
//END new plots menu
kDebug() << "KStandardDirs::resourceDirs( icon )="<<KGlobal::dirs()->resourceDirs( "icon" )<<endl;
kDebug() << "KStandardDirs::resourceDirs( icon )="<<KGlobal::dirs()->resourceDirs( "icon" );
View::self()->m_menuSliderAction = actionCollection()->add<KToggleAction>( "options_configure_show_sliders" );
View::self()->m_menuSliderAction->setText( i18n( "Show Sliders" ) );
......@@ -404,7 +404,7 @@ void MainDlg::setupActions()
void MainDlg::undo()
{
kDebug() << k_funcinfo << endl;
kDebug() << k_funcinfo;
if ( m_undoStack.isEmpty() )
return;
......@@ -422,7 +422,7 @@ void MainDlg::undo()
void MainDlg::redo()
{
kDebug() << k_funcinfo << endl;
kDebug() << k_funcinfo;
if ( m_redoStack.isEmpty() )
return;
......@@ -507,7 +507,7 @@ void MainDlg::slotSave()
return;
}
kmplotio->save( this->url() );
kDebug() << "saved" << endl;
kDebug() << "saved";
m_modified = false;
}
......@@ -570,7 +570,7 @@ void MainDlg::slotExport()
}
KMimeType::Ptr mimeType = KMimeType::findByUrl( url );
kDebug() << k_funcinfo << "mimetype: " << mimeType->name() << endl;
kDebug() << k_funcinfo << "mimetype: " << mimeType->name();
bool isSvg = mimeType->name() == "image/svg+xml";
......
......@@ -95,7 +95,7 @@ ParameterAnimator::ParameterAnimator( QWidget * parent, Function * function )
ParameterAnimator::~ ParameterAnimator()
{
kDebug() << k_funcinfo << endl;
kDebug() << k_funcinfo;
m_function->m_parameters.animating = false;
View::self()->drawPlot();
}
......
......@@ -353,7 +353,7 @@ double Parser::fkt( Equation * eq, const Vector & x )
while(1)
{
// kDebug() << "*eq->mptr: "<<int(*eq->mptr)<<endl;
// kDebug() << "*eq->mptr: "<<int(*eq->mptr);
switch(*eq->mptr++)
{
......
......@@ -198,7 +198,7 @@ double View::niceTicSpacing( double length_mm, double range )
// Don't assert, as we can at least handle this situation - and it can
// happen with extreme zooms
kWarning() << k_funcinfo << "Non-positive length: length_mm="<<length_mm<<endl;
kWarning() << k_funcinfo << "Non-positive length: length_mm="<<length_mm;
length_mm = 120;
}
......@@ -264,7 +264,7 @@ void View::initDrawing( QPaintDevice * device, PlotMedium medium )
if ( m_clipRect.width() <= 0 || m_clipRect.height() <= 0 )
{
kWarning() << k_funcinfo << "Invalid clip rect: m_clipRect="<<m_clipRect<<endl;
kWarning() << k_funcinfo << "Invalid clip rect: m_clipRect="<<m_clipRect;
return;
}
......@@ -1379,7 +1379,7 @@ void View::drawImplicit( Function * function, QPainter * painter )
#ifdef DEBUG_IMPLICIT
kDebug() << "Singular point at (x,y)=("<<point.x()<<','<<point.y()<<")\n";
kDebug() << "fstr is " << fstr << endl;
kDebug() << "fstr is " << fstr;
kDebug() << "Found " << roots.size() << " roots.\n";
#endif
......@@ -1401,8 +1401,8 @@ void View::drawImplicit( Function * function, QPainter * painter )
#ifdef DEBUG_IMPLICIT
if ( root_find_requests != 0 )
kDebug() << "Average iterations in root finding was " << root_find_iterations/root_find_requests << endl;
kDebug() << "Time taken was " << t.elapsed() << endl;
kDebug() << "Average iterations in root finding was " << root_find_iterations/root_find_requests;
kDebug() << "Time taken was " << t.elapsed();
#endif
XParser::self()->removeFunction( circular.functionID() );
......@@ -1527,7 +1527,7 @@ void View::drawImplicitInSquare( const Plot & plot, QPainter * painter, double x
if ( !foundRootPreviously )
segment_step = qMin( segment_step/4, SegmentMin );
// kDebug() << "k="<<k<<" segment_step="<<segment_step<<endl;
// kDebug() << "k="<<k<<" segment_step="<<segment_step;
QPointF p1 = toPixel( QPointF( x, y ), ClipInfinite ) * painter->matrix();
QPointF p2 = toPixel( QPointF( x+dx, y+dy ), ClipInfinite ) * painter->matrix();
......@@ -1555,7 +1555,7 @@ void View::drawImplicitInSquare( const Plot & plot, QPainter * painter, double x
// switched direction and are already at the smallest step size, then note
// the dodgy point for further investigation and give up for now
// kDebug() << "Switched direction: x="<<x<<" switchCount="<<switchCount<<" segment_step="<<segment_step<<" i="<<i<<endl;
// kDebug() << "Switched direction: x="<<x<<" switchCount="<<switchCount<<" segment_step="<<segment_step<<" i="<<i;
// Use a step size much smaller than segment min to obtain good accuracy,
// needed for investigating the point further
......@@ -1581,7 +1581,7 @@ void View::drawImplicitInSquare( const Plot & plot, QPainter * painter, double x
// Reset the stepping adjustment
switchCount = qMax( 0, switchCount-1 );
prevAngle = angle;
// kDebug() << "Didn't switch - x="<<x<<" segment_step="<<segment_step<<endl;
// kDebug() << "Didn't switch - x="<<x<<" segment_step="<<segment_step;
}
if ( i == 0 )
......@@ -2043,7 +2043,7 @@ void View::drawPlot( const Plot & plot, QPainter *painter )
}
while ( x <= dmax );
// kDebug() << "drawPoints.size()="<<drawPoints.size()<<endl;
// kDebug() << "drawPoints.size()="<<drawPoints.size();
drawPolyline( painter, drawPoints );
painter->restore();
......@@ -2889,7 +2889,7 @@ double View::pixelCurvature( const Plot & plot, double x, double y )
fdy = XParser::self()->derivative( d1, f->eq[0], state, x, h ) * sy;
fddy = XParser::self()->derivative( d2, f->eq[0], state, x, h) * sy;
// kDebug() << k_funcinfo << "fdy="<<fdy<<" fddy="<<fddy<<endl;
// kDebug() << k_funcinfo << "fdy="<<fdy<<" fddy="<<fddy;
break;
}
......@@ -3836,7 +3836,7 @@ void View::keyPressEvent( QKeyEvent * e )
m_currentPlot.plotMode=old_m_currentPlot.plotMode;
break;
}
kDebug() << "m_currentPlot.functionID: " << m_currentPlot.functionID << endl;
kDebug() << "m_currentPlot.functionID: " << m_currentPlot.functionID;
switch ( (*it)->type() )
{
case Function::Parametric:
......@@ -3856,7 +3856,7 @@ void View::keyPressEvent( QKeyEvent * e )
m_currentPlot.plotMode = (Function::PMode)(old_m_currentPlot.plotMode+1);
start=false;
}
kDebug() << " m_currentPlot.plotMode: " << (int)m_currentPlot.plotMode << endl;
kDebug() << " m_currentPlot.plotMode: " << (int)m_currentPlot.plotMode;
if ( (*it)->plotAppearance( m_currentPlot.plotMode ).visible )
found = true;
......@@ -3876,10 +3876,10 @@ void View::keyPressEvent( QKeyEvent * e )
}
}
kDebug() << "************************" << endl;
kDebug() << "m_currentPlot.functionID: " << (int)m_currentPlot.functionID << endl;
kDebug() << "m_currentPlot.plotMode: " << (int)m_currentPlot.plotMode << endl;
kDebug() << "m_currentFunctionParameter: " << m_currentFunctionParameter << endl;
kDebug() << "************************";
kDebug() << "m_currentPlot.functionID: " << (int)m_currentPlot.functionID;
kDebug() << "m_currentPlot.plotMode: " << (int)m_currentPlot.plotMode;
kDebug() << "m_currentFunctionParameter: " << m_currentFunctionParameter;
setStatusBar( (*it)->prettyName( m_currentPlot.plotMode ), FunctionSection );
......@@ -4241,7 +4241,7 @@ void View::setStatusBar( const QString & t, StatusBarSection section )
void View::slidersWindowClosed()
{
kDebug() << k_funcinfo << endl;
kDebug() << k_funcinfo;
m_menuSliderAction->setChecked(false);
}
//END class View
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment