diff --git a/qucs/extsimkernels/abstractspicekernel.cpp b/qucs/extsimkernels/abstractspicekernel.cpp index 13d490fb..03f262cb 100644 --- a/qucs/extsimkernels/abstractspicekernel.cpp +++ b/qucs/extsimkernels/abstractspicekernel.cpp @@ -437,7 +437,7 @@ void AbstractSpiceKernel::parseHBOutput(QString ngspice_file, QList sim_point; sim_point.clear(); for (int i=1;i=2) { - QStringList nods = lines.at(0).split(QRegularExpression("\\s"),qucs::SkipEmptyParts); - QStringList vals = lines.at(1).split(QRegularExpression("\\s"),qucs::SkipEmptyParts); + QStringList nods = lines.at(0).split(QRegularExpression("\\s"), Qt::SkipEmptyParts); + QStringList vals = lines.at(1).split(QRegularExpression("\\s"), Qt::SkipEmptyParts); QStringList::iterator n,v; for(n = nods.begin(),v = vals.begin();n!=nods.end()||v!=vals.end();n++,v++) { if ((*n).startsWith("I(")) { @@ -918,7 +918,7 @@ bool AbstractSpiceKernel::extractASCIISamples(QString &lin, QTextStream &ngsp_da sim_point.append(indep_val); for (int i=0;i sim_point; for (int i = 1; i <= var_list.count(); i++ ) { if (isComplex && i != 1) { @@ -1074,10 +1074,10 @@ void AbstractSpiceKernel::parseResFile(QString resfile, QString &var, QStringLis while (!swp_data.atEnd()) { QString lin = swp_data.readLine(); if (var_pattern.match(lin).hasMatch()) { - var = lin.split(sep,qucs::SkipEmptyParts).last(); + var = lin.split(sep, Qt::SkipEmptyParts).last(); } if (point_pattern.match(lin).hasMatch()) { - values.append(lin.split(sep,qucs::SkipEmptyParts).last()); + values.append(lin.split(sep, Qt::SkipEmptyParts).last()); } } ofile.close(); diff --git a/qucs/extsimkernels/ngspice.cpp b/qucs/extsimkernels/ngspice.cpp index b61ae257..6169e4bf 100644 --- a/qucs/extsimkernels/ngspice.cpp +++ b/qucs/extsimkernels/ngspice.cpp @@ -222,7 +222,7 @@ void Ngspice::createNetlist(QTextStream &stream, int , spiceNetlist.append(pc->getSpiceNetlist()); nods = pc->Props.at(1)->Value; nods.replace(';', ' '); - outputs.append(pc->Props.at(2)->Value.split(';', qucs::SkipEmptyParts)); + outputs.append(pc->Props.at(2)->Value.split(';', Qt::SkipEmptyParts)); QRegularExpression ac_rx("^\\s*ac\\s.*", QRegularExpression::CaseInsensitiveOption); QRegularExpression sp_rx("^\\s*sp\\s.*", QRegularExpression::CaseInsensitiveOption); diff --git a/qucs/extsimkernels/qucs2spice.cpp b/qucs/extsimkernels/qucs2spice.cpp index b40143a6..033d38ee 100644 --- a/qucs/extsimkernels/qucs2spice.cpp +++ b/qucs/extsimkernels/qucs2spice.cpp @@ -125,7 +125,7 @@ QString qucs2spice::convert_netlist(QString netlist, bool xyce) QString qucs2spice::convert_rcl(const QString& line) { QString s=""; - QStringList lst = line.split(" ",qucs::SkipEmptyParts); + QStringList lst = line.split(" ", Qt::SkipEmptyParts); QString s1 = lst.takeFirst(); s += s1.remove(':'); s += " " + lst.takeFirst(); @@ -141,7 +141,7 @@ QString qucs2spice::convert_header(QString line) { QString s = line; s.replace(".Def:",".SUBCKT "); - QStringList lst = s.split(' ',qucs::SkipEmptyParts); + QStringList lst = s.split(' ', Qt::SkipEmptyParts); lst.insert(2," gnd "); // ground s = lst.join(" "); s += "\n"; @@ -151,7 +151,7 @@ QString qucs2spice::convert_header(QString line) QString qucs2spice::convert_diode(QString line,bool xyce) { QString s=""; - QStringList lst = line.split(" ",qucs::SkipEmptyParts); + QStringList lst = line.split(" ", Qt::SkipEmptyParts); QString name = lst.takeFirst(); auto idx = name.indexOf(':'); name = name.right(name.size()-idx-1); // name @@ -168,7 +168,7 @@ QString qucs2spice::convert_diode(QString line,bool xyce) QString qucs2spice::convert_mosfet(QString line, bool xyce) { QString s=""; - QStringList lst = line.split(" ",qucs::SkipEmptyParts); + QStringList lst = line.split(" ", Qt::SkipEmptyParts); QString name = lst.takeFirst(); auto idx = name.indexOf(':'); name = name.right(name.size()-idx-1); // name @@ -210,7 +210,7 @@ QString qucs2spice::convert_mosfet(QString line, bool xyce) QString qucs2spice::convert_jfet(const QString& line, bool xyce) { QString s=""; - QStringList lst = line.split(" ",qucs::SkipEmptyParts); + QStringList lst = line.split(" ", Qt::SkipEmptyParts); QString name = lst.takeFirst(); auto idx = name.indexOf(':'); name = name.right(name.size()-idx-1); // name @@ -241,7 +241,7 @@ QString qucs2spice::convert_jfet(const QString& line, bool xyce) QString qucs2spice::convert_bjt(const QString& line) { QString s=""; - QStringList lst = line.split(" ",qucs::SkipEmptyParts); + QStringList lst = line.split(" ", Qt::SkipEmptyParts); QString name = lst.takeFirst(); auto idx = name.indexOf(':'); name = name.right(name.size()-idx-1); // name @@ -291,7 +291,7 @@ QString qucs2spice::convert_ccvs(const QString& line) QString qucs2spice::convert_ccs(const QString& line, bool voltage) { - QStringList lst = line.split(" ",qucs::SkipEmptyParts); + QStringList lst = line.split(" ", Qt::SkipEmptyParts); QString name = lst.takeFirst(); auto idx = name.indexOf(':'); name = name.right(name.size()-idx-1); // name @@ -323,7 +323,7 @@ QString qucs2spice::convert_vcvs(const QString& line) QString qucs2spice::convert_vcs(const QString& line,bool voltage) { - QStringList lst = line.split(" ",qucs::SkipEmptyParts); + QStringList lst = line.split(" ", Qt::SkipEmptyParts); QString name = lst.takeFirst(); auto idx = name.indexOf(':'); name = name.right(name.size()-idx-1); // name @@ -346,7 +346,7 @@ QString qucs2spice::convert_vcs(const QString& line,bool voltage) QString qucs2spice::convert_dc_src(const QString& line) { QString s=""; - QStringList lst = line.split(" ",qucs::SkipEmptyParts); + QStringList lst = line.split(" ", Qt::SkipEmptyParts); QString s1 = lst.takeFirst(); s += s1.remove(':'); s += " " + lst.takeFirst(); @@ -361,7 +361,7 @@ QString qucs2spice::convert_dc_src(const QString& line) QString qucs2spice::convert_edd(const QString& line, QStringList &EqnsAndVars) { QString s=""; - QStringList lst = line.split(" ",qucs::SkipEmptyParts); + QStringList lst = line.split(" ", Qt::SkipEmptyParts); QStringList nods; QString nam = lst.takeFirst().remove(':'); @@ -406,7 +406,7 @@ QString qucs2spice::convert_edd(const QString& line, QStringList &EqnsAndVars) QString qucs2spice::convert_subckt(QString line) { QString s=""; - QStringList lst = line.split(" ",qucs::SkipEmptyParts); + QStringList lst = line.split(" ", Qt::SkipEmptyParts); QString s1 = lst.takeFirst(); s += "X" + s1.remove("Sub:") + " gnd "; @@ -440,7 +440,7 @@ QString qucs2spice::convert_subckt(QString line) QString qucs2spice::convert_gyrator(QString line) { QString s=""; - QStringList lst = line.split(" ",qucs::SkipEmptyParts); + QStringList lst = line.split(" ", Qt::SkipEmptyParts); QString Name = lst.takeFirst(); Name = Name.section(':',1,1); QString n1 = lst.takeFirst(); diff --git a/qucs/extsimkernels/s2spice.cpp b/qucs/extsimkernels/s2spice.cpp index 55ca55c7..84f89fa2 100644 --- a/qucs/extsimkernels/s2spice.cpp +++ b/qucs/extsimkernels/s2spice.cpp @@ -109,7 +109,7 @@ bool S2Spice::convertTouchstone(QTextStream *stream) } /* input impedances */ - QStringList tmp_lst = next_line.split(" ",qucs::SkipEmptyParts); + QStringList tmp_lst = next_line.split(" ", Qt::SkipEmptyParts); z[0] = tmp_lst.at(tmp_lst.count()-1).toDouble(); for (int i = 0; i < ports; i++ ) { if ( a_z0 < 0 ) { /* takes the Z value from the input file */ @@ -140,10 +140,10 @@ bool S2Spice::convertTouchstone(QTextStream *stream) break; } if(next_line.at(0)=='!') continue; - tmp_lst = next_line.split(QRegularExpression("[ \\t]"), qucs::SkipEmptyParts); + tmp_lst = next_line.split(QRegularExpression("[ \\t]"), Qt::SkipEmptyParts); if (tmp_lst.count() < 2*(ports*ports)+1) { while (in_stream.readLineInto(&next_line)) { // line continuation - auto new_items = next_line.split(QRegularExpression("[ \\t]"), qucs::SkipEmptyParts); + auto new_items = next_line.split(QRegularExpression("[ \\t]"), Qt::SkipEmptyParts); tmp_lst.append(new_items); if (tmp_lst.count() >= 2*(ports*ports)+1 ) break; } diff --git a/qucs/extsimkernels/spicecompat.cpp b/qucs/extsimkernels/spicecompat.cpp index 5b1f854d..e123d96f 100644 --- a/qucs/extsimkernels/spicecompat.cpp +++ b/qucs/extsimkernels/spicecompat.cpp @@ -305,7 +305,7 @@ int spicecompat::getPins(const QString &file, const QString &compname, QStringLi } if (subckt_header.match(lin).hasMatch()) { - QStringList lst2 = lin.split(sep,qucs::SkipEmptyParts); + QStringList lst2 = lin.split(sep, Qt::SkipEmptyParts); QString name = lin.section(sep,1,1,QString::SectionSkipEmpty).toLower(); QString refname = compname.toLower(); if (name != refname) continue; diff --git a/qucs/main.cpp b/qucs/main.cpp index 02186f99..c329d772 100644 --- a/qucs/main.cpp +++ b/qucs/main.cpp @@ -143,7 +143,7 @@ bool loadSettings() QucsSettings.GraphAntiAliasing = _settings::Get().item("GraphAntiAliasing"); QucsSettings.TextAntiAliasing = _settings::Get().item("TextAntiAliasing"); QucsSettings.fullTraceName = _settings::Get().item("fullTraceName"); - QucsSettings.RecentDocs = _settings::Get().item("RecentDocs").split("*",qucs::SkipEmptyParts); + QucsSettings.RecentDocs = _settings::Get().item("RecentDocs").split("*", Qt::SkipEmptyParts); QucsSettings.numRecentDocs = QucsSettings.RecentDocs.count(); QucsSettings.spiceExtensions << "*.sp" << "*.cir" << "*.spc" << "*.spi"; diff --git a/qucs/misc.h b/qucs/misc.h index d6ec8cd0..5e5549bd 100644 --- a/qucs/misc.h +++ b/qucs/misc.h @@ -26,16 +26,6 @@ #define Q_UINT32 uint32_t - -namespace qucs { -#if QT_VERSION >= 0x050e00 - const auto SkipEmptyParts = Qt::SkipEmptyParts; -#else - const auto SkipEmptyParts = QString::SkipEmptyParts; -#endif -} - - class Schematic; namespace misc { diff --git a/qucs/schematic.cpp b/qucs/schematic.cpp index 5a3b332b..9bec4139 100644 --- a/qucs/schematic.cpp +++ b/qucs/schematic.cpp @@ -1810,7 +1810,7 @@ int Schematic::adjustPortNumbers() VInfo = VHDL_File_Info(Name, true); if (!VInfo.PortNames.isEmpty()) - Names = VInfo.PortNames.split(",", qucs::SkipEmptyParts); + Names = VInfo.PortNames.split(",", Qt::SkipEmptyParts); for (pp = a_SymbolPaints.first(); pp != 0; pp = a_SymbolPaints.next()) if (pp->Name == ".ID ") { @@ -1818,11 +1818,11 @@ int Schematic::adjustPortNumbers() id->Prefix = VInfo.EntityName.toUpper(); id->Parameter.clear(); if (!VInfo.GenNames.isEmpty()) - GNames = VInfo.GenNames.split(",", qucs::SkipEmptyParts); + GNames = VInfo.GenNames.split(",", Qt::SkipEmptyParts); if (!VInfo.GenTypes.isEmpty()) - GTypes = VInfo.GenTypes.split(",", qucs::SkipEmptyParts); + GTypes = VInfo.GenTypes.split(",", Qt::SkipEmptyParts); if (!VInfo.GenDefs.isEmpty()) - GDefs = VInfo.GenDefs.split(",", qucs::SkipEmptyParts); + GDefs = VInfo.GenDefs.split(",", Qt::SkipEmptyParts); ; for (Number = 1, it = GNames.begin(); it != GNames.end(); ++it) { id->Parameter.append( @@ -1871,7 +1871,7 @@ int Schematic::adjustPortNumbers() else VInfo = Verilog_File_Info(Name, true); if (!VInfo.PortNames.isEmpty()) - Names = VInfo.PortNames.split(",", qucs::SkipEmptyParts); + Names = VInfo.PortNames.split(",", Qt::SkipEmptyParts); for (pp = a_SymbolPaints.first(); pp != 0; pp = a_SymbolPaints.next()) if (pp->Name == ".ID ") { @@ -1918,7 +1918,7 @@ int Schematic::adjustPortNumbers() VInfo = VerilogA_File_Info(Name, true); if (!VInfo.PortNames.isEmpty()) - Names = VInfo.PortNames.split(",", qucs::SkipEmptyParts); + Names = VInfo.PortNames.split(",", Qt::SkipEmptyParts); for (pp = a_SymbolPaints.first(); pp != 0; pp = a_SymbolPaints.next()) if (pp->Name == ".ID ") { diff --git a/qucs/schematic_file.cpp b/qucs/schematic_file.cpp index 67163e8c..188b8439 100644 --- a/qucs/schematic_file.cpp +++ b/qucs/schematic_file.cpp @@ -299,7 +299,7 @@ int Schematic::savePropsJSON() continue; } if (line.contains("parameter")) { - auto tokens = line.split(QRegularExpression("[\\s=;]"),qucs::SkipEmptyParts); + auto tokens = line.split(QRegularExpression("[\\s=;]"), Qt::SkipEmptyParts); if (tokens.count() >= 4) { for(int ic = 0; ic <= tokens.count(); ic++) { if (tokens.at(ic) == "parameter") {