remove operators in QPIConfig::Entry
git-svn-id: svn://db.shs.com.ru/libs@946 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -243,7 +243,6 @@ QPIConfig::QPIConfig(const QString & path, QIODevice::OpenMode mode, QPIConfig::
|
||||
type = type_;
|
||||
if (!path.isEmpty()) {
|
||||
open(mode);
|
||||
//stream.setDevice(this);
|
||||
parse();
|
||||
}
|
||||
}
|
||||
@@ -254,7 +253,6 @@ QPIConfig::QPIConfig(const QString & path, QIODevice::OpenMode mode): QFile(path
|
||||
type = Config;
|
||||
if (!path.isEmpty()) {
|
||||
open(mode);
|
||||
//stream.setDevice(this);
|
||||
parse();
|
||||
}
|
||||
}
|
||||
@@ -265,7 +263,6 @@ QPIConfig::QPIConfig(const QString & path, QPIConfig::FileType type_): QFile(pat
|
||||
type = type_;
|
||||
if (!path.isEmpty()) {
|
||||
open(QIODevice::ReadWrite);
|
||||
//stream.setDevice(this);
|
||||
parse();
|
||||
}
|
||||
}
|
||||
@@ -275,7 +272,6 @@ QPIConfig::QPIConfig(QString * str, QPIConfig::FileType type_) {
|
||||
init();
|
||||
type = type_;
|
||||
buffer = str;
|
||||
//stream.setDevice(this);
|
||||
parse();
|
||||
}
|
||||
|
||||
@@ -565,7 +561,6 @@ void QPIConfig::removeEntry(Branch & b, QPIConfig::Entry * e) {
|
||||
if (e->isLeaf()) other.removeAt(e->_line);
|
||||
if (!e->isLeaf() && !e->_value.isEmpty()) {
|
||||
e->_value.clear();
|
||||
//leaf = false;
|
||||
} else {
|
||||
int cc = e->_children.size();
|
||||
for (int i = 0; i < cc; ++i)
|
||||
@@ -598,14 +593,12 @@ void QPIConfig::writeAll() {
|
||||
buffer->clear();
|
||||
}
|
||||
stream.seek(0);
|
||||
//writeEntry(&root);
|
||||
buildFullNames(&root);
|
||||
Branch b = allLeaves();
|
||||
QString prefix, tprefix;
|
||||
bool isPrefix;
|
||||
int j = 0;
|
||||
for (int i = 0; i < other.size(); ++i) {
|
||||
//cout << j << endl;
|
||||
if (j >= 0 && j < b.size()) {
|
||||
if (b[j]->_line == i) {
|
||||
b[j]->buildLine();
|
||||
@@ -657,12 +650,10 @@ QString QPIConfig::getPrefixFromLine(QString line, bool * exists) {
|
||||
QString QPIConfig::writeAllToString() {
|
||||
QString str;
|
||||
QTextStream s(&str);
|
||||
//writeEntry(&root);
|
||||
buildFullNames(&root);
|
||||
Branch b = allLeaves();
|
||||
int j = 0;
|
||||
for (int i = 0; i < other.size(); ++i) {
|
||||
//cout << j << endl;
|
||||
if (j >= 0 && j < b.size()) {
|
||||
if (b[j]->_line == i) {
|
||||
b[j]->buildLine();
|
||||
@@ -803,7 +794,6 @@ void QPIConfig::parse(QString content) {
|
||||
type = "s";
|
||||
comm = "";
|
||||
}
|
||||
//name = str.left(ind).trimmed();
|
||||
tree = (prefix + str.left(ind).trimmed()).split(delim);
|
||||
if (tree.front() == "include") {
|
||||
name = str.right(str.length() - ind - 1).trimmed();
|
||||
@@ -815,7 +805,6 @@ void QPIConfig::parse(QString content) {
|
||||
includes << iconf << iconf->includes;
|
||||
updateIncludes();
|
||||
}
|
||||
//piCout << "includes" << includes;
|
||||
other.back() = src;
|
||||
} else {
|
||||
name = tree.back();
|
||||
@@ -858,5 +847,4 @@ void QPIConfig::parse(QString content) {
|
||||
}
|
||||
setEntryDelim(&root, delim);
|
||||
buildFullNames(&root);
|
||||
//if (content.isEmpty()) stream.setDevice(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user