From de8eceae1b37d02b71136ef01c76a2a4fecd4041 Mon Sep 17 00:00:00 2001 From: ruglory Date: Sat, 15 Feb 2014 19:06:26 +0000 Subject: [PATCH] v0.15 bugfixes git-svn-id: https://svn.code.sf.net/p/qlscribe/svn/trunk@186 cac9541e-1b8d-4bfa-827e-589bba606050 --- ChangeLog | 2 +- INSTALL | 7 ++++++- cmake/FindDbus32.cmake | 2 +- debian/changelog | 1 + lscribed/drives.cpp | 2 +- lscribed/main.cpp | 1 + src/mainwindow.cpp | 2 +- src/qlightscribe.cpp | 27 ++++++++++++++------------- 8 files changed, 26 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 606910a..937f7bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,5 +3,5 @@ * For historical reasons: this is when I imported qlscribe into SourceForge. - $Revision:$ $Date:$ + $Revision$ $Date$ diff --git a/INSTALL b/INSTALL index f54f7df..5f5fe00 100644 --- a/INSTALL +++ b/INSTALL @@ -12,6 +12,7 @@ So for Ubuntu folowing packages are required: For 64 bit Ubuntu you need also to install folowing packages: ia32-libs libc6-dev-i386 (maverick only, see notes) + g++-multilib (Note: this will work for maverick (10.10) version, for lucid and karmic /usr/lib32/libstdc++.so.5 is missing in ia32-libs so you would have to @@ -20,6 +21,10 @@ For 64 bit Ubuntu you need also to install folowing packages: possible that link /usr/lib32/libstdc++.so points to /usr/lib32/libstdc++.so.5... change it so it points /usr/lib32/libstdc++.so.6...) +For 64 bit Ubuntu libdbus-1-dev does not have link for i386 libdbus-1.so you may need to create one manually: + sudo ln -s libdbus-1.so.3 /lib/i386-linux-gnu/libdbus-1.so + + To compile and install, first download release from http://qlscribe.sourceforge.net/ or check out project from subversion repository for particular release: @@ -49,7 +54,7 @@ Include files should be in ${LIGHTSCRIBEDIR}/include and lib in ${LIGHTSCRIBEDIR You need manually install dbus config and service files. They are located in INSTALL_PATH/share/qlscribe So on my ubuntu system I do sudo cp /usr/local/share/qlscribe/lightscribe.conf /etc/dbus-1/system.d/ - sudo cp /usr/local/share/qlscribe/org.lightscribe.Manager.service /usr/share/dbus-1/system-services/ + sudo cp /usr/local/share/qlscribe/org.lightscribe.printManager.service /usr/share/dbus-1/system-services/ sudo /etc/init.d/dbus reload Your system may have different path please refer dbus system daemon documentation diff --git a/cmake/FindDbus32.cmake b/cmake/FindDbus32.cmake index b787ef9..19b28d5 100644 --- a/cmake/FindDbus32.cmake +++ b/cmake/FindDbus32.cmake @@ -32,7 +32,7 @@ FIND_LIBRARY( DBUS_LIBRARY dbus-1 ) get_filename_component( _dbusLibPath ${DBUS_LIBRARY} PATH ) FIND_PATH( DBUS_LIBINCLUDE_DIR dbus/dbus-arch-deps.h - PATHS /lib /usr/lib /usr/local/lib ${_dbusLibPath} + PATHS /lib /usr/lib /usr/local/lib /usr/lib/x86_64-linux-gnu /usr/lib/i386-linux-gnu ${_dbusLibPath} PATH_SUFFIXES dbus-1.0/include ) if( DBUS_INCLUDE_DIR AND DBUS_LIBINCLUDE_DIR AND DBUS_LIBRARY ) diff --git a/debian/changelog b/debian/changelog index e6f13a3..71d174d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,5 @@ qlscribe (0.15-0lenny1) unstable; urgency=low + * Release 0.16 imported * Release 0.15 imported * Release 0.14 imported * Release 0.13 imported diff --git a/lscribed/drives.cpp b/lscribed/drives.cpp index 59a6f15..c552b05 100644 --- a/lscribed/drives.cpp +++ b/lscribed/drives.cpp @@ -278,7 +278,7 @@ void Drive::routine() function = "LS_DiscPrintMgr_EnumDiscPrinters"; EnumDiscPrinters printers = manager.EnumDiscPrinters(); - if( m_index >= printers.Count() ) + if( m_index >= int( printers.Count() ) ) throw std::string( "internal error: invalid index" ); DiscPrinter printer = printers.Item( m_index ); diff --git a/lscribed/main.cpp b/lscribed/main.cpp index ee14943..fc15f77 100644 --- a/lscribed/main.cpp +++ b/lscribed/main.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include "lscribed.h" #include "dbuscpp.h" diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2b37536..2209853 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -545,7 +545,7 @@ void MainWindow::onMenuAbout() QMessageBox::about( this, tr( "About" ), tr( "

qlscribe - Qt lisghtScribe

" - "

prerelease 0.16 $Revision$

" + "

release 0.16 $Revision$

" "

visit project at home page " "qlscribe.sourceforge.net

" ) ); } diff --git a/src/qlightscribe.cpp b/src/qlightscribe.cpp index bb0a594..8cce97b 100644 --- a/src/qlightscribe.cpp +++ b/src/qlightscribe.cpp @@ -109,21 +109,22 @@ QLightDrive::QLightDrive( QObject *parent, const QString &path, const QString &n static void printScene( QCDScene *scene, QByteArray &array ) { - QImage image( 2772, 2772, QImage::Format_RGB888 ); - image.fill( 0xFFFFFFFF ); + const int resolution = 2772; + QImage image( resolution, resolution, QImage::Format_RGB888 ); + image.fill( 0xFFFFFFFF ); - scene->clearSelection(); - { - QPainter painter( &image ); - scene->render( &painter, image.rect() ); - } - image.setDotsPerMeterX( 23622 ); - image.setDotsPerMeterY( 23622 ); + scene->clearSelection(); + { + QPainter painter( &image ); + scene->render( &painter, image.rect() ); + } + image.setDotsPerMeterX( resolution * 8 ); + image.setDotsPerMeterY( resolution * 8 ); - array.clear(); - QBuffer buffer( &array ); - buffer.open( QIODevice::WriteOnly ); - image.save( &buffer, "bmp", 100 ); + array.clear(); + QBuffer buffer( &array ); + buffer.open( QIODevice::WriteOnly ); + image.save( &buffer, "bmp", 100 ); } QPixmap QLightDrive::preview( const PrintParameters ¶ms, QCDScene *scene, const QSize &size ) throw( QString )