Author: JirkaH Date: 2010-02-25 14:54:38 +0100 (Thu, 25 Feb 2010) New Revision: 1870 Modified: trunk/client/elvys-client/Makefile trunk/client/elvys-client/bin/appconfig.xml trunk/client/elvys-client/bin/appconfig.xml.static trunk/client/elvys-client/elvys-client.pro.user trunk/client/elvys-client/src/Makefile trunk/client/elvys-client/src/pdfcommonviewer.cpp trunk/client/elvys-client/src/pdfpresentationdocument.cpp trunk/client/elvys-client/src/statictext.cpp trunk/client/elvys-client/src/statisticsdata.cpp Log: some bugfixes. Modified: trunk/client/elvys-client/Makefile =================================================================== --- trunk/client/elvys-client/Makefile 2010-02-25 13:49:59 UTC (rev 1869) +++ trunk/client/elvys-client/Makefile 2010-02-25 13:54:38 UTC (rev 1870) @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: elvys-client -# Generated by qmake (2.01a) (Qt 4.5.3) on: Tue Feb 23 20:39:27 2010 +# Generated by qmake (2.01a) (Qt 4.5.3) on: Thu Feb 25 13:56:06 2010 # Project: elvys-client.pro # Template: subdirs # Command: /usr/bin/qmake -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=release -o Makefile elvys-client.pro Modified: trunk/client/elvys-client/bin/appconfig.xml =================================================================== --- trunk/client/elvys-client/bin/appconfig.xml 2010-02-25 13:49:59 UTC (rev 1869) +++ trunk/client/elvys-client/bin/appconfig.xml 2010-02-25 13:54:38 UTC (rev 1870) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <a:app_config elvysVersion="1.0-b1" xmlns:a="cz/elvys/jaxbgen/app"> - <a:machine_id>19</a:machine_id> + <a:machine_id>13</a:machine_id> <a:data_url> <a:http_address>http://elvys.farm.particle.cz/dataIntegrationNew/4</a:http_address> </a:data_url> Modified: trunk/client/elvys-client/bin/appconfig.xml.static =================================================================== --- trunk/client/elvys-client/bin/appconfig.xml.static 2010-02-25 13:49:59 UTC (rev 1869) +++ trunk/client/elvys-client/bin/appconfig.xml.static 2010-02-25 13:54:38 UTC (rev 1870) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <app_config elvysVersion="1.0-b1"> - <machine_id>19</machine_id> + <machine_id>13</machine_id> <data_url> <http_address>http://elvys.farm.particle.cz/dataIntegration/4</http_address> </data_url> Modified: trunk/client/elvys-client/elvys-client.pro.user =================================================================== --- trunk/client/elvys-client/elvys-client.pro.user 2010-02-25 13:49:59 UTC (rev 1869) +++ trunk/client/elvys-client/elvys-client.pro.user 2010-02-25 13:54:38 UTC (rev 1870) @@ -150,7 +150,7 @@ <value type="QString" >CONFIG+=release</value> </valuelist> <value key="abstractProcess.command" type="QString" >/usr/bin/qmake</value> - <value key="abstractProcess.enabled" type="bool" >false</value> + <value key="abstractProcess.enabled" type="bool" >true</value> <value key="abstractProcess.workingDirectory" type="QString" >/home/keruom/elvys/trunk/client/elvys-client</value> <value key="buildConfiguration" type="int" >0</value> </valuemap> Modified: trunk/client/elvys-client/src/Makefile =================================================================== --- trunk/client/elvys-client/src/Makefile 2010-02-25 13:49:59 UTC (rev 1869) +++ trunk/client/elvys-client/src/Makefile 2010-02-25 13:54:38 UTC (rev 1870) @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: ../bin/elvys-client -# Generated by qmake (2.01a) (Qt 4.5.3) on: Wed Feb 24 10:43:16 2010 +# Generated by qmake (2.01a) (Qt 4.5.3) on: Thu Feb 25 13:56:05 2010 # Project: src.pro # Template: app # Command: /usr/bin/qmake -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=release -o Makefile src.pro Modified: trunk/client/elvys-client/src/pdfcommonviewer.cpp =================================================================== --- trunk/client/elvys-client/src/pdfcommonviewer.cpp 2010-02-25 13:49:59 UTC (rev 1869) +++ trunk/client/elvys-client/src/pdfcommonviewer.cpp 2010-02-25 13:54:38 UTC (rev 1870) @@ -127,7 +127,7 @@ void PDFCommonViewer::setBorder(bool focused) { if (focused) { setFrameStyle(QFrame::Panel | QFrame::Plain); - setLineWidth(AppConfig::getInstance()->getAppWidth() / 380); + setLineWidth(AppConfig::getInstance()->getAppWidth() / 280); setPalette( AppConfig::getInstance()->getPaletteFocused() ); } else { setLineWidth(1); Modified: trunk/client/elvys-client/src/pdfpresentationdocument.cpp =================================================================== --- trunk/client/elvys-client/src/pdfpresentationdocument.cpp 2010-02-25 13:49:59 UTC (rev 1869) +++ trunk/client/elvys-client/src/pdfpresentationdocument.cpp 2010-02-25 13:54:38 UTC (rev 1870) @@ -55,7 +55,11 @@ void PDFPresentationDocument::setPages() { bool retval; - retval = pdfFiller->setPages(pages, pages.first()); + if (pages.isEmpty()) { + return; + } + + retval = pdfFiller->setPages(pages, pages.first()); //we can pass first page here as we don't care about about mainpage pdfPresViewer->setPages(pages); if ( retval) { //there was a change in pages list pdfFiller->updatePageSizes(width(), height(), AppConfig::getInstance()->getZoomWidth(parentWidget()), AppConfig::getInstance()->getZoomHeight(parentWidget())); Modified: trunk/client/elvys-client/src/statictext.cpp =================================================================== --- trunk/client/elvys-client/src/statictext.cpp 2010-02-25 13:49:59 UTC (rev 1869) +++ trunk/client/elvys-client/src/statictext.cpp 2010-02-25 13:54:38 UTC (rev 1870) @@ -50,6 +50,9 @@ while ( textWidth > width() ) { textWidthRatio = (double) textWidth / (double) width(); newSize = (int) ( (double)realFont.pointSize() / textWidthRatio ); + if (newSize == 0) { + realFont.setPointSizeF((double)realFont.pointSize() / textWidthRatio); + } realFont.setPointSize(newSize); delete fontM; fontM = new QFontMetrics(realFont); Modified: trunk/client/elvys-client/src/statisticsdata.cpp =================================================================== --- trunk/client/elvys-client/src/statisticsdata.cpp 2010-02-25 13:49:59 UTC (rev 1869) +++ trunk/client/elvys-client/src/statisticsdata.cpp 2010-02-25 13:54:38 UTC (rev 1870) @@ -163,8 +163,7 @@ downloadCompleteHandler(docId, layoutId); } else if (e->subType() == ElvysNs::exhibitStartEvent) { exhibitStartHandler(docId, layoutId, posId, panelId, catId); - } else if (e->subType() == ElvysNs::exhibitFinishedEvent) { - qDebug() << "finish event"; + } else if (e->subType() == ElvysNs::exhibitFinishedEvent) { exhibitCompleteHandler(docId, layoutId, posId, panelId, catId); } @@ -349,8 +348,6 @@ } if ( ! query.first() ) { //empty query - qWarning() << query.executedQuery(); - qWarning() << documentId << layoutId << layoutPosition << AppConfig::getInstance()->getCurrentModeString(); query.prepare("INSERT INTO " TABLE_NAME " VALUES " INSERT_BINDING); query.bindValue(":elvys_id", AppConfig::getInstance()->getMachineID()); query.bindValue(":layout_id", layoutId); @@ -443,8 +440,7 @@ HttpAddress address = AppConfig::getInstance()->getStatisticsAddress(); QString userAgent = QString("Statistics") + QString("%1").arg(AppConfig::getInstance()->getMachineID()); - uploader->upload(httpId, address, *array, userAgent); - qWarning() << array->data(); + uploader->upload(httpId, address, *array, userAgent); delete array; delete xmlWriter; }