Commit 11e84f14 authored by Thomas Eschenbacher's avatar Thomas Eschenbacher
Browse files

fixed some deprecation warnings about 'endl'

parent 2ca8d861
......@@ -1016,7 +1016,7 @@ int Kwave::MainWidget::saveLabels(const QString &filename)
const QString name = Kwave::Parser::escape(label.name());
out << _("label:add(") << pos;
if (name.length()) out << _(", ") << name;
out << _(")") << endl;
out << _(")") << Qt::endl;
}
file.close();
......
......@@ -147,9 +147,9 @@ void Kwave::Filter::save(const QString &filename)
file.open(QIODevice::WriteOnly);
QTextStream out(&file);
out << ((m_fir) ? "FIR " : "IIR ") << count() << endl;
out << ((m_fir) ? "FIR " : "IIR ") << count() << Qt::endl;
for (unsigned int i = 0; i < count(); i++) {
out << m_delay[i] << ' ' << m_coeff[i] << endl;
out << m_delay[i] << ' ' << m_coeff[i] << Qt::endl;
}
file.close();
......
......@@ -89,12 +89,14 @@ bool Kwave::Logger::open(const QString& filename)
QTextStream out(m_logfile);
const KAboutData about_data = KAboutData::applicationData();
out << "#Version: 1.0" << endl;
out << "#Fields: x-status date time x-pid x-message" << endl;
out << "#Version: 1.0" << Qt::endl;
out << "#Fields: x-status date time x-pid x-message" << Qt::endl;
out << "#Software: " << about_data.displayName() << " "
<< about_data.version() << endl;
<< about_data.version() << Qt::endl;
QDateTime now = QDateTime::currentDateTime();
out << "#Start-Date: " << now.toString(_("yyyy-MM-dd hh:mm:ss")) << endl;
out << "#Start-Date: "
<< now.toString(_("yyyy-MM-dd hh:mm:ss"))
<< Qt::endl;
return true;
}
......@@ -133,9 +135,7 @@ void Kwave::Logger::log(const QObject *sender,
out << "<" << x_status << "> " <<
now.toString(_("yyyy-MM-dd hh:mm:ss.zzz")) << " " <<
x_pid << " " <<
msg <<
endl;
x_pid << " " << msg << Qt::endl;
}
m_logfile->flush();
......
......@@ -100,10 +100,10 @@ bool Kwave::AsciiEncoder::encode(QWidget *widget,
// write out the default properties:
// sample rate, bits, tracks, length
m_dst << META_PREFIX << "'rate'=" << info.rate() << endl;
m_dst << META_PREFIX << "'tracks'=" << tracks << endl;
m_dst << META_PREFIX << "'bits'=" << bits << endl;
m_dst << META_PREFIX << "'length'=" << length << endl;
m_dst << META_PREFIX << "'rate'=" << info.rate() << Qt::endl;
m_dst << META_PREFIX << "'tracks'=" << tracks << Qt::endl;
m_dst << META_PREFIX << "'bits'=" << bits << Qt::endl;
m_dst << META_PREFIX << "'length'=" << length << Qt::endl;
// write out all other, non-standard properties that we have
QMap<Kwave::FileProperty, QVariant> properties = info.properties();
......@@ -121,7 +121,7 @@ bool Kwave::AsciiEncoder::encode(QWidget *widget,
// write the property
m_dst << META_PREFIX << "'" << info.name(p) << "'='"
<< Kwave::Parser::escape(v.toString()).toUtf8()
<< "'" << endl;
<< "'" << Qt::endl;
}
// write out all labels
......@@ -130,7 +130,7 @@ bool Kwave::AsciiEncoder::encode(QWidget *widget,
m_dst << META_PREFIX << "'label["
<< QString::number(label.pos()) << "]'='"
<< Kwave::Parser::escape(label.name()).toUtf8()
<< "'" << endl;
<< "'" << Qt::endl;
}
sample_index_t rest = length;
......@@ -162,13 +162,13 @@ bool Kwave::AsciiEncoder::encode(QWidget *widget,
pos++;
// end of line
m_dst << endl;
m_dst << Qt::endl;
}
} while (false);
// end of file
m_dst << "# EOF " << endl << endl;
m_dst << "# EOF " << Qt::endl << Qt::endl;
m_dst.setDevice(Q_NULLPTR);
dst.close();
......
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