src/gui/painting/qprintengine_win.cpp
branchRCL_3
changeset 14 c0432d11811c
parent 4 3b1da2848fc7
child 30 5dc02b23752f
equal deleted inserted replaced
13:cc75c76972ee 14:c0432d11811c
   962     QString output = QString::fromWCharArray(buffer);
   962     QString output = QString::fromWCharArray(buffer);
   963     if (output.isEmpty() || output == noPrinters) // no printers
   963     if (output.isEmpty() || output == noPrinters) // no printers
   964         return;
   964         return;
   965 
   965 
   966     QStringList info = output.split(QLatin1Char(','));
   966     QStringList info = output.split(QLatin1Char(','));
   967     if (info.size() > 0) {
   967     int infoSize = info.size();
       
   968     if (infoSize > 0) {
   968         if (name.isEmpty())
   969         if (name.isEmpty())
   969             name = info.at(0);
   970             name = info.at(0);
   970         if (program.isEmpty())
   971         if (program.isEmpty() && infoSize > 1)
   971             program = info.at(1);
   972             program = info.at(1);
   972         if (port.isEmpty())
   973         if (port.isEmpty() && infoSize > 2)
   973             port = info.at(2);
   974             port = info.at(2);
   974     }
   975     }
   975 }
   976 }
   976 
   977 
   977 QWin32PrintEnginePrivate::~QWin32PrintEnginePrivate()
   978 QWin32PrintEnginePrivate::~QWin32PrintEnginePrivate()