Hello community, here is the log from the commit of package kdesdk4 for openSUSE:Factory checked in at 2011-12-08 12:10:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdesdk4 (Old) and /work/SRC/openSUSE:Factory/.kdesdk4.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdesdk4", Maintainer is "kde-maintain...@suse.de" Changes: -------- --- /work/SRC/openSUSE:Factory/kdesdk4/kdesdk4.changes 2011-12-01 17:37:51.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kdesdk4.new/kdesdk4.changes 2011-12-08 12:10:22.000000000 +0100 @@ -1,0 +2,15 @@ +Wed Dec 7 11:30:54 UTC 2011 - co...@suse.com + +- fix license to be in spdx.org format + +------------------------------------------------------------------- +Sat Dec 3 19:11:16 CET 2011 - rwooni...@opensuse.org + +- Add libtool as BuildRequires to build kstartperf + +------------------------------------------------------------------- +Fri Dec 2 01:59:16 CET 2011 - dmuel...@suse.de + +- update to 4.7.4 + * see http://kde.org/announcements/changelogs/changelog4_7_3to4_7_4.php for details +------------------------------------------------------------------- Old: ---- kdesdk-4.7.3.tar.bz2 umbrella-virtual-qobject.patch New: ---- kdesdk-4.7.4.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdesdk4.spec ++++++ --- /var/tmp/diff_new_pack.waPypF/_old 2011-12-08 12:10:24.000000000 +0100 +++ /var/tmp/diff_new_pack.waPypF/_new 2011-12-08 12:10:24.000000000 +0100 @@ -15,19 +15,16 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: kdesdk4 -Version: 4.7.3 -Release: 1 -License: GPLv2+ +Version: 4.7.4 +Release: 0 Summary: KDE SDK Package -Url: http://www.kde.org/ +License: GPL-2.0+ Group: System/GUI/KDE +Url: http://www.kde.org/ Source0: kdesdk-%{version}.tar.bz2 Source100: kdesdk4-rpmlintrc Patch0: desktop-files.diff -Patch1: umbrella-virtual-qobject.patch BuildRequires: antlr BuildRequires: antlr-devel # for libiberty (used by kmtrace for cp_demangle) @@ -44,6 +41,7 @@ BuildRequires: oxygen-icon-theme BuildRequires: strigi BuildRequires: subversion-devel +BuildRequires: libtool BuildRoot: %{_tmppath}/%{name}-%{version}-build %kde4_runtime_requires Requires(post): shared-mime-info @@ -55,7 +53,6 @@ %prep %setup -q -n kdesdk-%{version} %patch0 -%patch1 -p1 %build %ifarch ppc64 @@ -107,8 +104,8 @@ %_kde4_bindir/update-mime-database %{_datadir}/mime &> /dev/null || : %package scripts -License: GPLv2+ Summary: Scripts for KDE Development +License: GPL-2.0+ Group: System/GUI/KDE %kde4_runtime_requires @@ -121,8 +118,8 @@ %doc COPYING COPYING.DOC README %package -n kde4-l10n-devel -License: GPLv2+ Summary: KDE SDK Package +License: GPL-2.0+ Group: Development/Libraries/KDE %kde4_runtime_requires @@ -134,8 +131,8 @@ %doc COPYING COPYING.DOC README %package -n lokalize -License: GPLv2+ Summary: KDE Translation Editor +License: GPL-2.0+ Group: System/GUI/KDE # Requires strigila_po.so (bnc#410716) Requires: kdesdk4-strigi @@ -153,8 +150,8 @@ %doc COPYING COPYING.DOC README %package -n dolphin-plugins -License: GPLv2+ Summary: Version control plugins for dolphin +License: GPL-2.0+ Group: System/GUI/KDE %kde4_runtime_requires @@ -173,8 +170,8 @@ %_kde4_modulesdir/fileviewsvnplugin.so %package -n okteta -License: GPLv2+ Summary: Hex Editor +License: GPL-2.0+ Group: Development/Tools/Other Provides: kde4-okteta = 4.0.81 Obsoletes: kde4-okteta < 4.0.81 @@ -199,8 +196,8 @@ %dir %_kde4_appsdir/oktetapart %package -n okteta-devel -License: GPLv2+ Summary: Hex Editor +License: GPL-2.0+ Group: Development/Tools/Other Requires: okteta @@ -215,8 +212,8 @@ %{_includedir}/okteta %package -n cervisia -License: GPLv2+ Summary: CVS Frontend +License: GPL-2.0+ Group: Development/Tools/Version Control Provides: kde4-cervisia = 4.3.0 Obsoletes: kde4-cervisia < 4.3.0 @@ -231,8 +228,8 @@ %dir %_kde4_appsdir/cervisiapart %package -n kuiviewer -License: GPLv2+ Summary: UI Files Viewer +License: GPL-2.0+ Group: Development/Tools/Other Provides: kde4-kuiviewer = 4.3.0 Obsoletes: kde4-kuiviewer < 4.3.0 @@ -247,8 +244,8 @@ %dir %_kde4_appsdir/kuiviewerpart %package -n kcachegrind -License: GPLv2+ Summary: Frontend for Cachegrind +License: GPL-2.0+ Group: Development/Tools/Other Provides: kde4-kcachegrind = 4.3.0 Obsoletes: kde4-kcachegrind < 4.3.0 @@ -262,8 +259,8 @@ %doc COPYING COPYING.DOC README %package -n kde4-kapptemplate -License: GPLv2+ Summary: Template for KDE Application Development +License: GPL-2.0+ Group: System/GUI/KDE %kde4_runtime_requires @@ -279,8 +276,8 @@ %dir %_kde4_appsdir/kdevappwizard/template_previews %package -n kio_svn -License: GPLv2+ Summary: KDE KIO-Slave for SVN +License: GPL-2.0+ Group: System/GUI/KDE Provides: kde4-kio_svn = 4.3.0 Obsoletes: kde4-kio_svn < 4.3.0 @@ -295,8 +292,8 @@ %dir %_kde4_appsdir/kio_perldoc %package -n kmtrace -License: GPLv2+ Summary: Memory Allocation Debugging Tool +License: GPL-2.0+ Group: Development/Tools/Other Provides: kde4-kmtrace = 4.3.0 Obsoletes: kde4-kmtrace < 4.3.0 @@ -317,8 +314,8 @@ %doc COPYING COPYING.DOC README %package -n kstartperf -License: GPLv2+ Summary: KDE Benchmarking Tool +License: GPL-2.0+ Group: Development/Tools/Other Provides: kde4-kstartperf = 4.3.0 Obsoletes: kde4-kstartperf < 4.3.0 @@ -332,8 +329,8 @@ %doc COPYING COPYING.DOC README %package kdeaccounts -License: GPLv2+ Summary: KAddressBook Plugins for Developer Database +License: GPL-2.0+ Group: System/GUI/KDE Requires: kdepim4-runtime %kde4_runtime_requires @@ -348,8 +345,8 @@ %doc COPYING COPYING.DOC README %package -n umbrello -License: GPLv2+ Summary: UML Modeller +License: GPL-2.0+ Group: Development/Tools/Other Provides: kde4-umbrello = 4.3.0 Obsoletes: kde4-umbrello < 4.3.0 @@ -363,8 +360,8 @@ %doc COPYING COPYING.DOC README %package -n kpartloader -License: GPLv2 ; GPLv2+ Summary: KDE SDK Package +License: GPL-2.0 ; GPL-2.0+ Group: System/GUI/KDE Provides: kde4-kpartloader = 4.3.0 Obsoletes: kde4-kpartloader < 4.3.0 @@ -378,8 +375,8 @@ %doc COPYING COPYING.DOC README %package -n kompare -License: GPLv2+ Summary: File Comparator +License: GPL-2.0+ Group: Development/Tools/Other Provides: kde4-kompare = 4.3.0 Obsoletes: kde4-kompare < 4.3.0 @@ -397,8 +394,8 @@ %doc COPYING COPYING.DOC README %package -n kompare-devel -License: GPLv2+ Summary: Hex Editor +License: GPL-2.0+ Group: Development/Tools/Other Requires: kompare = %{version} @@ -410,8 +407,8 @@ %dir %{_includedir}/kompare %package strigi -License: GPLv2+ Summary: Diff and translation indexing for strigi +License: GPL-2.0+ Group: Development/Tools/Other Provides: kdedsk4 = %{version} Obsoletes: kdedsk4 < %{version} @@ -430,8 +427,8 @@ %{_datadir}/strigi/fieldproperties/strigi_translation.fieldproperties %package -n kprofilemethod -License: GPLv2+ Summary: Macros for profiling KDE applications +License: GPL-2.0+ Group: Development/Tools/Other BuildArch: noarch ++++++ kdesdk-4.7.3.tar.bz2 -> kdesdk-4.7.4.tar.bz2 ++++++ Files old/kdesdk-4.7.3/doc/cervisia/index.cache.bz2 and new/kdesdk-4.7.4/doc/cervisia/index.cache.bz2 differ Files old/kdesdk-4.7.3/doc/kapptemplate/index.cache.bz2 and new/kdesdk-4.7.4/doc/kapptemplate/index.cache.bz2 differ Files old/kdesdk-4.7.3/doc/kcachegrind/index.cache.bz2 and new/kdesdk-4.7.4/doc/kcachegrind/index.cache.bz2 differ Files old/kdesdk-4.7.3/doc/kompare/index.cache.bz2 and new/kdesdk-4.7.4/doc/kompare/index.cache.bz2 differ Files old/kdesdk-4.7.3/doc/okteta/index.cache.bz2 and new/kdesdk-4.7.4/doc/okteta/index.cache.bz2 differ Files old/kdesdk-4.7.3/doc/umbrello/index.cache.bz2 and new/kdesdk-4.7.4/doc/umbrello/index.cache.bz2 differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesdk-4.7.3/kapptemplate/templates/C++/runner/%{APPNAMELC}.desktop new/kdesdk-4.7.4/kapptemplate/templates/C++/runner/%{APPNAMELC}.desktop --- old/kdesdk-4.7.3/kapptemplate/templates/C++/runner/%{APPNAMELC}.desktop 2011-07-20 00:15:53.000000000 +0200 +++ new/kdesdk-4.7.4/kapptemplate/templates/C++/runner/%{APPNAMELC}.desktop 2011-12-02 00:44:35.000000000 +0100 @@ -53,7 +53,6 @@ Comment[ca@valencia]=Llançador de %{APPNAME} Comment[cs]=%{APPNAME} runner Comment[da]=%{APPNAME}-runner -Comment[de]=%{APPNAME} Comment[el]=εκτελεστής %{APPNAME} Comment[en_GB]=%{APPNAME} runner Comment[es]=Lanzador para %{APPNAME} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesdk-4.7.3/kioslave/svn/svnhelper/subversion.desktop new/kdesdk-4.7.4/kioslave/svn/svnhelper/subversion.desktop --- old/kdesdk-4.7.3/kioslave/svn/svnhelper/subversion.desktop 2011-10-28 09:54:15.000000000 +0200 +++ new/kdesdk-4.7.4/kioslave/svn/svnhelper/subversion.desktop 2011-11-17 22:37:31.000000000 +0100 @@ -304,7 +304,7 @@ Name[et]=Ümbernimetamine... Name[eu]=Berrizendatu... Name[fa]=تغییر نام... -Name[fi]=Nimeä uudelleen... +Name[fi]=Muuta nimeä... Name[fr]=Renommer... Name[ga]=Athainmnigh... Name[gl]=Mudar o nome... @@ -362,7 +362,7 @@ Comment[et]=Faili ümbernimetamine nii kohalikult kui hoidlas. See on eelistatud viis faili ümbernimetamisel lisamise ja kustutamise asemel. Comment[eu]=Berrizendatu fitxategi bat lokalki eta biltegian. Erabili hau fitxategia ezabatu eta berriro gehitu ordez. Comment[fa]=تغییر نام پروندۀ محلی و در مخزن. به جای افزودن و حذف، برای تغییر نام پرونده از این استفاده کنید. -Comment[fi]=Nimeä uudelleen paikallinen ja versionhallinnassa oleva tiedosto. Nimeä tiedosto uudelleen mieluummin näin kuin lisäämällä ja poistamalla. +Comment[fi]=Muuta paikallisen ja versionhallinnassa olevan tiedoston nimeä. Muuta tiedoston nimeä mieluummin näin kuin lisäämällä ja poistamalla. Comment[fr]=Renomme un fichier localement et dans le référentiel. Utilisez cette option pour renommer un fichier, au lieu de le supprimer puis l'ajouter. Comment[ga]=Athraigh ainm comhaid logánta agus sa stór. Úsáid é seo in ionad an comhad a scriosadh agus a chur ar ais chun a ainm a athrú. Comment[gl]=Muda o nome dun ficheiro tanto localmente como no repositorio. Use isto en vez de engadir e eliminar o ficheiro para mudar o nome. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesdk-4.7.3/kompare/komparepart/komparesplitter.cpp new/kdesdk-4.7.4/kompare/komparepart/komparesplitter.cpp --- old/kdesdk-4.7.3/kompare/komparepart/komparesplitter.cpp 2010-12-01 23:23:04.000000000 +0100 +++ new/kdesdk-4.7.4/kompare/komparepart/komparesplitter.cpp 2011-12-02 00:55:25.000000000 +0100 @@ -297,7 +297,7 @@ { if(widget(0)) { KompareListView *view = listView(0); - return view->visibleHeight() - QStyle::PM_ScrollBarExtent; + return view->visibleHeight() - view->style()->pixelMetric( QStyle::PM_ScrollBarExtent ); } return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesdk-4.7.3/kompare/libdialogpages/filespage.cpp new/kdesdk-4.7.4/kompare/libdialogpages/filespage.cpp --- old/kdesdk-4.7.3/kompare/libdialogpages/filespage.cpp 2009-01-28 00:04:48.000000000 +0100 +++ new/kdesdk-4.7.4/kompare/libdialogpages/filespage.cpp 2011-12-02 00:55:25.000000000 +0100 @@ -2,8 +2,8 @@ filespage.cpp ------------- begin : Sun Apr 18 2004 - Copyright 2004 Otto Bruggeman <otto.brugge...@home.nl> - Copyright 2007 Kevin Kofler <kevin.kof...@chello.at> + Copyright 2004 Otto Bruggeman <otto.brugge...@home.nl> + Copyright 2007-2011 Kevin Kofler <kevin.kof...@chello.at> ****************************************************************************/ /*************************************************************************** @@ -62,7 +62,8 @@ QHBoxLayout* gb3Layout = new QHBoxLayout( m_thirdGB ); m_encodingComboBox = new KComboBox( false, m_thirdGB ); m_encodingComboBox->setObjectName( "encoding_combobox" ); - m_encodingComboBox->insertStringList( KGlobal::charsets()->availableEncodingNames() ); + m_encodingComboBox->insertItem( 0, "Default" ); + m_encodingComboBox->insertItems( 1, KGlobal::charsets()->availableEncodingNames() ); gb3Layout->addWidget( m_encodingComboBox ); layout->addWidget( m_firstGB ); @@ -132,7 +133,7 @@ m_firstURLComboBox->setUrl( KUrl( m_settings->m_lastChosenSourceURL ) ); m_secondURLComboBox->setUrls( m_settings->m_recentDestinations ); m_secondURLComboBox->setUrl( KUrl( m_settings->m_lastChosenDestinationURL ) ); - m_encodingComboBox->setCurrentText( m_settings->m_encoding ); + m_encodingComboBox->setCurrentIndex( m_encodingComboBox->findText( m_settings->m_encoding, Qt::MatchFixedString ) ); } void FilesPage::restore() @@ -155,7 +156,7 @@ m_firstURLComboBox->setUrl( KUrl( "" ) ); m_secondURLComboBox->setUrls( QStringList() ); m_secondURLComboBox->setUrl( KUrl( "" ) ); - m_encodingComboBox->setCurrentText( "Default" ); + m_encodingComboBox->setCurrentIndex( 0 ); // "Default" } #include "filespage.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesdk-4.7.3/kompare/main.cpp new/kdesdk-4.7.4/kompare/main.cpp --- old/kdesdk-4.7.3/kompare/main.cpp 2009-02-26 10:13:03.000000000 +0100 +++ new/kdesdk-4.7.4/kompare/main.cpp 2011-12-02 00:55:25.000000000 +0100 @@ -45,7 +45,7 @@ /** * Version number. */ -static const char version[] = "4.0.0"; +static const char version[] = "4.0.1"; /** * Setting up the KAboutData structure. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesdk-4.7.3/lokalize/src/tm/jobs.cpp new/kdesdk-4.7.4/lokalize/src/tm/jobs.cpp --- old/kdesdk-4.7.3/lokalize/src/tm/jobs.cpp 2011-09-01 22:50:32.000000000 +0200 +++ new/kdesdk-4.7.4/lokalize/src/tm/jobs.cpp 2011-12-02 00:55:30.000000000 +0100 @@ -1276,7 +1276,7 @@ float score=9500*(pow(float(commonLen)/float(allLen),0.12f))//this was < 1 so we have increased it //this was > 1 so we have decreased it, and increased result: - / exp(0.014*float(addLen)*log10(3+addSubStrCount)); + / exp(0.014*float(addLen)*log10(float(3+addSubStrCount))); if (delLen) { @@ -1284,7 +1284,7 @@ //<<pow(float(delLen*delSubStrCount),0.1)<<" " //<<endl; - float a=exp(0.008*float(delLen)*log10(3+delSubStrCount)); + float a=exp(0.008*float(delLen)*log10(float(3+delSubStrCount))); if (a!=0.0) score/=a; @@ -1296,7 +1296,7 @@ { //kWarning(TM_AREA) <<"SelectJob: b "<<int(pow(float(delLen*delSubStrCount),0.10)); float score=9900*(pow(float(commonLen)/float(allLen),0.15f)) - / exp(0.008*float(delLen)*log10(3+delSubStrCount)); + / exp(0.008*float(delLen)*log10(float(3+delSubStrCount))); e.score=(int)score; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesdk-4.7.3/umbrello/umbrello/codegenerators/ownedcodeblock.cpp new/kdesdk-4.7.4/umbrello/umbrello/codegenerators/ownedcodeblock.cpp --- old/kdesdk-4.7.3/umbrello/umbrello/codegenerators/ownedcodeblock.cpp 2011-05-20 22:18:59.000000000 +0200 +++ new/kdesdk-4.7.4/umbrello/umbrello/codegenerators/ownedcodeblock.cpp 2011-12-02 00:55:26.000000000 +0100 @@ -22,6 +22,9 @@ #include "uml.h" #include "textblock.h" +/** + * Constructor + */ OwnedCodeBlock::OwnedCodeBlock ( UMLObject * parent ) : QObject ( parent ) { @@ -29,6 +32,9 @@ initFields(parent); } +/** + * Empty Destructor + */ OwnedCodeBlock::~OwnedCodeBlock ( ) { /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesdk-4.7.3/umbrello/umbrello/codegenerators/ownedcodeblock.h new/kdesdk-4.7.4/umbrello/umbrello/codegenerators/ownedcodeblock.h --- old/kdesdk-4.7.3/umbrello/umbrello/codegenerators/ownedcodeblock.h 2009-01-28 00:03:55.000000000 +0100 +++ new/kdesdk-4.7.4/umbrello/umbrello/codegenerators/ownedcodeblock.h 2011-12-02 00:55:26.000000000 +0100 @@ -5,7 +5,7 @@ * (at your option) any later version. * * * * copyright (C) 2003 Brian Thomas <tho...@mail630.gsfc.nasa.gov> * - * copyright (C) 2004-2008 * + * copyright (C) 2004-2011 * * Umbrello UML Modeller Authors <uml-de...@uml.sf.net> * ***************************************************************************/ @@ -23,19 +23,12 @@ * Describes any codeblock which is 'owned' by a UMLobject of some sort and should * be in sync with that parent. */ -class OwnedCodeBlock : virtual public QObject +class OwnedCodeBlock : public QObject { Q_OBJECT public: - /** - * Constructor - */ OwnedCodeBlock ( UMLObject * parent ); - - /** - * Empty Destructor - */ virtual ~OwnedCodeBlock ( ); UMLObject * getParentObject ( ); @@ -47,9 +40,7 @@ virtual void release (); virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement); - virtual void setAttributesFromNode ( QDomElement & element); - virtual void setAttributesFromObject (TextBlock * obj); private: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesdk-4.7.3/umbrello/umbrello/codeimport/idlimport.cpp new/kdesdk-4.7.4/umbrello/umbrello/codeimport/idlimport.cpp --- old/kdesdk-4.7.3/umbrello/umbrello/codeimport/idlimport.cpp 2009-01-28 00:04:33.000000000 +0100 +++ new/kdesdk-4.7.4/umbrello/umbrello/codeimport/idlimport.cpp 2011-12-02 00:55:27.000000000 +0100 @@ -80,7 +80,7 @@ QChar c = word[i]; if (c.isLetterOrNumber() || c == '_') { lexeme += c; - } else if (c == ':' && word[i + 1] == ':') { + } else if (c == ':' && i < len-1 && word[i + 1] == ':') { // compress scoped name into lexeme lexeme += "::"; i++; @@ -180,13 +180,14 @@ const QString& name = advance(); UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Class, name, m_scope[m_scopeIndex], m_comment); - m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns); + m_klass = static_cast<UMLClassifier*>(ns); m_klass->setStereotype("CORBAInterface"); m_klass->setAbstract(m_isAbstract); m_isAbstract = false; m_comment.clear(); if (advance() == ";") // forward declaration return true; + m_scope[++m_scopeIndex] = m_klass; if (m_source[m_srcIndex] == ":") { while (++m_srcIndex < srcLength && m_source[m_srcIndex] != "{") { const QString& baseName = m_source[m_srcIndex]; @@ -259,11 +260,12 @@ const QString& name = advance(); UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Class, name, m_scope[m_scopeIndex], m_comment); - m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns); + m_klass = static_cast<UMLClassifier*>(ns); m_klass->setAbstract(m_isAbstract); m_isAbstract = false; if (advance() == ";") // forward declaration return true; + m_scope[++m_scopeIndex] = m_klass; if (m_source[m_srcIndex] == ":") { if (advance() == "truncatable") m_srcIndex++; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesdk-4.7.3/umbrello/umbrello/uml.cpp new/kdesdk-4.7.4/umbrello/umbrello/uml.cpp --- old/kdesdk-4.7.3/umbrello/umbrello/uml.cpp 2011-05-20 22:19:00.000000000 +0200 +++ new/kdesdk-4.7.4/umbrello/umbrello/uml.cpp 2011-12-02 00:55:27.000000000 +0100 @@ -79,6 +79,7 @@ #include <QtCore/QRegExp> #include <QtCore/QTimer> #include <QtGui/QClipboard> +#include <QtGui/QDialogButtonBox> #include <QtGui/QSlider> #include <QtGui/QToolButton> #include <QtGui/QKeyEvent> @@ -88,6 +89,7 @@ #include <QtGui/QStackedWidget> #include <QtGui/QPrinter> #include <QtGui/QPrintDialog> +#include <QtGui/QPrintPreviewDialog> #include <QtGui/QUndoView> /** Static pointer, holding the last created instance. */ @@ -133,6 +135,9 @@ m_doc = new UMLDoc(); m_doc->init(); m_hasBegunMacro = false; + m_printSettings = 0; + m_printer = new QPrinter; + m_printer->setFullPage(true); readOptionState(); initActions(); @@ -187,6 +192,7 @@ delete m_copyTimer; delete m_refactoringAssist; delete m_pUndoStack; + delete m_printer; } /** @@ -221,6 +227,7 @@ QAction* fileSaveAs = KStandardAction::saveAs(this, SLOT(slotFileSaveAs()), actionCollection()); QAction* fileClose = KStandardAction::close(this, SLOT(slotFileClose()), actionCollection()); filePrint = KStandardAction::print(this, SLOT(slotFilePrint()), actionCollection()); + printPreview = KStandardAction::printPreview(this, SLOT(slotPrintPreview()), actionCollection()); QAction* fileQuit = KStandardAction::quit(this, SLOT(slotFileQuit()), actionCollection()); editUndo = m_pUndoStack->createUndoAction(actionCollection()); @@ -323,6 +330,7 @@ fileSaveAs->setToolTip(i18n("Saves the document as...")); fileClose->setToolTip(i18n("Closes the document")); filePrint->setToolTip(i18n("Prints out the document")); + printPreview->setToolTip(i18n("Print Preview of the document")); fileQuit->setToolTip(i18n("Quits the application")); fileExportDocbook->setToolTip(i18n("Exports the model to the docbook format")); fileExportXhtml->setToolTip(i18n("Exports the model to the XHTML format")); @@ -1162,6 +1170,58 @@ slotFileNew(); } +bool UMLApp::slotPrintSettings() +{ + if (m_printSettings) + delete m_printSettings; + m_printSettings = new DiagramPrintPage(0, m_doc); + + QDialog *d = new QDialog; + QVBoxLayout *layout = new QVBoxLayout; + layout->addWidget(m_printSettings); + + QDialogButtonBox *b = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); + connect(b, SIGNAL(accepted()), d, SLOT(accept())); + connect(b, SIGNAL(rejected()), d, SLOT(reject())); + layout->addWidget(b); + d->setLayout(layout); + + bool result = d->exec() == QDialog::Accepted; + + // keep settings + layout->removeWidget(m_printSettings); + m_printSettings->setParent(0); + + delete d; + return result; +} + +/** + * Print preview + */ +void UMLApp::slotPrintPreview() +{ + slotStatusMsg(i18n("Print Preview...")); + + if(!slotPrintSettings()) + return; + + QPrintPreviewDialog *preview = new QPrintPreviewDialog(m_printer,this); + connect(preview, SIGNAL(paintRequested(QPrinter *)), this, SLOT(slotPrintPreviewPaintRequested(QPrinter *))); + preview->exec(); + delete m_printSettings; + m_printSettings = 0; + resetStatusMsg(); +} + +/** + * Print preview painting slot + */ +void UMLApp::slotPrintPreviewPaintRequested(QPrinter *printer) +{ + m_doc->print(printer, m_printSettings); +} + /** * Print the current file. */ @@ -1169,17 +1229,18 @@ { slotStatusMsg(i18n("Printing...")); - QPrinter printer; - printer.setFullPage(true); + if(!slotPrintSettings()) + return; - DiagramPrintPage * selectPage = new DiagramPrintPage(0, m_doc); QPrintDialog *printDialog = - KdePrint::createPrintDialog(&printer, QList<QWidget*>() << selectPage, this); + KdePrint::createPrintDialog(m_printer, QList<QWidget*>() << m_printSettings, this); printDialog->setWindowTitle(i18n("Print %1", m_doc->url().prettyUrl())); if (printDialog->exec()) { - m_doc->print(&printer, selectPage); + m_doc->print(m_printer, m_printSettings); } + delete m_printSettings; + m_printSettings = 0; delete printDialog; resetStatusMsg(); } @@ -1506,6 +1567,7 @@ void UMLApp::enablePrint(bool enable) { filePrint->setEnabled(enable); + printPreview->setEnabled(enable); } /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesdk-4.7.3/umbrello/umbrello/uml.h new/kdesdk-4.7.4/umbrello/umbrello/uml.h --- old/kdesdk-4.7.3/umbrello/umbrello/uml.h 2010-07-16 21:05:08.000000000 +0200 +++ new/kdesdk-4.7.4/umbrello/umbrello/uml.h 2011-12-02 00:55:26.000000000 +0100 @@ -33,6 +33,7 @@ class RefactoringAssistant; class KPlayerPopupSliderAction; class XhtmlGenerator; +class DiagramPrintPage; // KDE forward declarations class KActionMenu; @@ -192,6 +193,9 @@ void slotFileSave(); bool slotFileSaveAs(); void slotFileClose(); + bool slotPrintSettings(); + void slotPrintPreview(); + void slotPrintPreviewPaintRequested(QPrinter *printer); void slotFilePrint(); void slotFileQuit(); void slotFileExportDocbook(); @@ -340,6 +344,7 @@ // KAction pointers to enable/disable actions KRecentFilesAction* fileOpenRecent; + QAction* printPreview; QAction* filePrint; QAction* editCut; QAction* editCopy; @@ -404,6 +409,9 @@ bool m_hasBegunMacro; ///< Macro creation flag. + DiagramPrintPage *m_printSettings; ///< printer diagram settings + QPrinter *m_printer; ///< print instance + signals: void sigCutSuccessful(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesdk-4.7.3/umbrello/umbrello/umlview.cpp new/kdesdk-4.7.4/umbrello/umbrello/umlview.cpp --- old/kdesdk-4.7.3/umbrello/umbrello/umlview.cpp 2010-09-27 21:51:07.000000000 +0200 +++ new/kdesdk-4.7.4/umbrello/umbrello/umlview.cpp 2011-12-02 00:55:27.000000000 +0100 @@ -237,11 +237,11 @@ QFontMetrics fm = pPainter.fontMetrics(); // use the painter font metrics, not the screen fm! int fontHeight = fm.lineSpacing(); // fetch printer margins individual for all four page sides, as at least top and bottom are not the same - uint left, right, top, bottom; + int left, right, top, bottom; QRect paper = pPrinter->paperRect(); QRect page = pPrinter->pageRect(); - top = paper.top() - page.top(); - left = paper.left() - page.left(); + top = page.top() - paper.top(); + left = page.left() - paper.left(); bottom = paper.bottom() - page.bottom(); right = paper.right() - page.right(); uDebug() << "margin: top=" << QString().setNum(top) << " left=" << QString().setNum(left) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdesdk-4.7.3/umbrello/umbrello/widgets/associationwidget.cpp new/kdesdk-4.7.4/umbrello/umbrello/widgets/associationwidget.cpp --- old/kdesdk-4.7.3/umbrello/umbrello/widgets/associationwidget.cpp 2011-05-20 22:19:00.000000000 +0200 +++ new/kdesdk-4.7.4/umbrello/umbrello/widgets/associationwidget.cpp 2011-12-02 00:55:27.000000000 +0100 @@ -2196,7 +2196,7 @@ const int y0 = p0.y(); const int x1 = p1.x(); const int y1 = p1.y(); - double r = sqrt((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0)) / 2; + double r = sqrt((double)(x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0)) / 2; if (textWidth > r) r = textWidth; // swap textCenter{X,Y} to convert from Qt coord.system. -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org