summaryrefslogtreecommitdiffstats
path: root/src/vsession.cpp
diff options
context:
space:
mode:
authorNils Schwabe2014-04-04 15:00:58 +0200
committerNils Schwabe2014-04-04 15:00:58 +0200
commitfc48e4b44760d0bb432a238e4c1b986062a91311 (patch)
tree6963b3bd46f06b2a9b57b80f1f0f5c09a84dc42b /src/vsession.cpp
parentchanged adDUSerAndHostname() (diff)
downloadvmchooser2-fc48e4b44760d0bb432a238e4c1b986062a91311.tar.gz
vmchooser2-fc48e4b44760d0bb432a238e4c1b986062a91311.tar.xz
vmchooser2-fc48e4b44760d0bb432a238e4c1b986062a91311.zip
removed addPrinters() and addScanners
introduced "change the run-virt.sh path" in cmd line and config file
Diffstat (limited to 'src/vsession.cpp')
-rw-r--r--src/vsession.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/vsession.cpp b/src/vsession.cpp
index 30cbb88..2987a62 100644
--- a/src/vsession.cpp
+++ b/src/vsession.cpp
@@ -177,50 +177,6 @@ int VSession::priority() const {
return getAttribute("priority").toInt();
}
-
-void VSession::addPrinters(const QString& script, const QString& type) {
- QDomElement printersNode =
- this->doc_.namedItem("eintrag").namedItem(type + "s").toElement();
-
- if (printersNode.isNull()) {
- // create new printers node
- printersNode = this->doc_.createElement(type + "s");
- this->doc_.namedItem("eintrag").appendChild(printersNode);
- }
-
- QProcess addPrintersScript;
- addPrintersScript.start(script, QIODevice::ReadOnly);
- while (!addPrintersScript.atEnd()) {
- QString line(addPrintersScript.readLine());
- QStringList tokens(line.split("\t"));
-
- if (tokens.size() < 2 or tokens.size() > 3) {
- // TODO error message
- // invalid output of printerScript
- // printserver\tprinter\tprinter description
- continue;
- }
-
- QDomElement printerNode(doc_.createElement(type));
- printerNode.setAttribute("name", tokens.at(1));
- printerNode.setAttribute("path",
- "\\\\" + tokens.at(0) + "\\" + tokens.at(1));
- if (tokens.size() == 3) {
- QDomText printerDescriptionNode(doc_.createTextNode(tokens.at(3)));
- printerNode.appendChild(printerDescriptionNode);
- }
- printersNode.appendChild(printerNode);
- }
-
- addPrintersScript.close();
-
- return;
-}
-
-void VSession::addScanners(const QString& script) {
- addPrinters(script, "scanner");
-}
-
void VSession::addUserAndHostname() {
QString username(getpwuid(geteuid())->pw_name);
this->addNodeWithAttribute("username", username);
@@ -306,9 +262,6 @@ bool VSession::run() const {
VSession session = *this;
- session.addPrinters(printerScript);
- session.addScanners(scannerScript);
-
session.addUserAndHostname();
session.mergePoolXml();