[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Adopting krecipes (of extragear, utils)
From: José_Manuel_Santamaría_Lema <panfaust () gmail ! com>
Date: 2009-03-13 20:13:10
Message-ID: 200903132113.22394.panfaust () gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
[Attachment #4 (multipart/mixed)]
Hi! Note that this message is bcc'ed to Jason Kivlighn, Unai Garro and
Bosselut Cyril (krecipes authors).
This is the project page:
http://krecipes.sourceforge.net
And at this moment there is a kde 4 version of krecipes, but it needs some
work to be finished:
svn://anonsvn.kde.org/home/kde/trunk/extragear/utils/krecipes
I'm a novice with no experience and I'm interested to get in touch with KDE
programming, so I want to adopt krecipes if it's not being maintained, fixing
bugs and doing kde 4 porting stuff like removing the use of Qt3 support
classes like Q3ValueList. It would be great if someone could update the
krecipes webpage noticing that there is a kde 4 version. I'm considering to
apply for a svn account if you agree.
There are three patches attached to this message, they solve three annoying
issues in the kde 4 version:
- Issue solved by 1st patch: If you choose sqlite backend and you haven't a
database previously, the program crashes with a segfault, before populating
the database. This happens because the database is empty, there are lists to
store the sql queries, the program executes a bad *iterator instruction
because there is a bogus atEnd() function doesn't check if the list is empty
which happens when the database is empty. For more details check what
krecipes do reading the kdebug messages and check patch.
- Issue solved by 2nd patch: Click on "Diet Helper" on the left panel, then
click "Create the diet" button, we cannot see the diet properly. We need to
set the html displayer as the main widget of the dialog.
- Issue solved by 3rd patch: In the left panel, I can't read anything because
the program doesn't draw the buttons' foreground which is a gradient, so we
need to add blitz stuff.
(I'm not sending patches to any tracker because the kde 4 version is not
released yet, is it?)
["patch1.diff" (text/x-diff)]
Index: src/backends/SQLite/libqsqlite/krecqsqliteresult.cpp
===================================================================
--- src/backends/SQLite/libqsqlite/krecqsqliteresult.cpp (revisión: 937113)
+++ src/backends/SQLite/libqsqlite/krecqsqliteresult.cpp (copia de trabajo)
@@ -151,7 +151,7 @@
bool QSQLiteResult::atEnd()
{
- if ( it == m_list.end() ) {
+ if ( (m_list.isEmpty()) || (it == m_list.end()) ) {
return true;
}
["patch2.diff" (text/x-diff)]
Index: src/dialogs/dietviewdialog.cpp
===================================================================
--- src/dialogs/dietviewdialog.cpp (revisión: 937113)
+++ src/dialogs/dietviewdialog.cpp (copia de trabajo)
@@ -26,6 +26,7 @@
setDefaultButton(KDialog::User2);
setModal( false );
KVBox *page = new KVBox( this );
+ setMainWidget(page);
setButtonText( KDialog::User1, KStandardGuiItem::print().text() );
setButtonText( KDialog::User2, i18n( "Create &Shopping List" ) );
["patch3.diff" (text/x-diff)]
Index: src/CMakeLists.txt
===================================================================
--- src/CMakeLists.txt (revisión: 937113)
+++ src/CMakeLists.txt (copia de trabajo)
@@ -1,10 +1,12 @@
include(FindLibXml2)
include(FindLibXslt)
+include(FindQImageBlitz)
find_package(Sqlite)
find_package(PostgreSQL)
find_package(MySQL)
-include_directories( ${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} \
${LIBXML2_INCLUDE_DIR} ${LIBXSLT_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/backends/) \
+find_package(QImageBlitz) +include_directories( ${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} \
${QT_INCLUDES} ${LIBXML2_INCLUDE_DIR} ${LIBXSLT_INCLUDE_DIR} \
${CMAKE_CURRENT_SOURCE_DIR}/backends/ ${QIMAGEBLITZ_INCLUDES})
########### QT3Support ###############
@@ -201,7 +203,7 @@
kde4_add_executable(krecipes ${mysql_SRCS} ${postgresql_SRCS} ${sqlite_SRCS} \
${krecipes_SRCS} ${krecipesdbs_SRCS} ${krecipesimporters_SRCS} \
${krecipeswidgets_SRCS} ${krecipesexporters_SRCS} ${datablocks_SRCS} \
${krecipesdialogs_SRCS})
-target_link_libraries(krecipes ${KDE4_KHTML_LIBS} ${KDE4_KDEUI_LIBS} \
${KDE4_KDE3SUPPORT_LIBS} ${QT_QTSQL_LIBRARY} ${LIBXSLT_LIBRARIES} ) \
+target_link_libraries(krecipes ${KDE4_KHTML_LIBS} ${KDE4_KDEUI_LIBS} \
${KDE4_KDE3SUPPORT_LIBS} ${QT_QTSQL_LIBRARY} ${LIBXSLT_LIBRARIES} \
${QIMAGEBLITZ_LIBRARIES})
if ( SQLITE_FOUND )
target_link_libraries(krecipes ${SQLITE_LIBRARIES})
Index: src/widgets/kremenu.cpp
===================================================================
--- src/widgets/kremenu.cpp (revisión: 937113)
+++ src/widgets/kremenu.cpp (copia de trabajo)
@@ -34,6 +34,7 @@
#include <kicon.h>
#include <klocale.h>
#include <qpixmap.h>
+#include <qimageblitz.h>
KreMenu::KreMenu( QWidget *parent, const char *name )
@@ -396,26 +397,27 @@
// draw the gradient now
QPainter painter;
QPixmap kpm;
- kpm.resize( ( ( QWidget * ) parent() ) ->size() ); // use parent's same size to \
obtain the same gradient + QImage tmpimage;
+ QSize parentsize = ((QWidget*) parent())->size();
if ( !highlighted ) {
// first the gradient
- // to be done KDE4 port
- //KPixmapEffect::unbalancedGradient ( kpm, c2, c1, \
KPixmapEffect::HorizontalGradient, -150, -150 ); + tmpimage = \
Blitz::gradient(parentsize,c2,c1,Blitz::HorizontalGradient); + kpm = \
QPixmap::fromImage(tmpimage);
}
else {
// top gradient (highlighted)
kpm.resize( width(), height() );
- //to be done KDE4 port
- //KPixmapEffect::unbalancedGradient ( kpm, c2h, c1h, \
KPixmapEffect::HorizontalGradient, -150, -150 ); // low gradient besides the line \
(not hightlighted) + tmpimage = \
Blitz::gradient(parentsize,c2h,c1h,Blitz::HorizontalGradient); + kpm = \
QPixmap::fromImage(tmpimage); QPixmap kpmb;
- kpmb.resize( width(), 2 );
- //to be done KDE4 port
- //KPixmapEffect::unbalancedGradient ( kpmb, c2, c1, \
KPixmapEffect::HorizontalGradient, -150, -150 ); + QImage tmpimage2;
+ tmpimage2 = Blitz::gradient(QSize(width(),2),c2,c1,Blitz::HorizontalGradient);
+ kpmb = QPixmap::fromImage(tmpimage2);
// mix the two
bitBlt( &kpm, 0, height() - 2, &kpmb );
@@ -494,8 +496,8 @@
QPixmap area;
area.resize( areaw, areah );
- //KDE4 port
- //KPixmapEffect::gradient( area, c2h.light( 150 ), c1h.light( 150 ), \
KPixmapEffect::VerticalGradient ); + QImage tmpimage = \
Blitz::gradient(QSize(areaw,areah),c2h.light(150),c1h.light(150),Blitz::VerticalGradient);
+ area = QPixmap::fromImage(tmpimage);
QLinearGradient linearGrad(QPointF(xPos, xPos + width()), QPointF(yPos, yPos + \
height())); linearGrad.setColorAt(0, c2h.light( 150 ) );
["signature.asc" (application/pgp-signature)]
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic