[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/office/tellico/src
From:       Robby Stephenson <robby () periapsis ! org>
Date:       2009-12-31 19:22:53
Message-ID: 1262287373.198529.16962.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1068297 by rstephenson:

Don't clean the image id if it's only a link
BUG:220645


 M  +3 -3      gui/imagewidget.cpp  
 M  +4 -0      images/CMakeLists.txt  
 M  +2 -1      images/image.cpp  


--- trunk/extragear/office/tellico/src/gui/imagewidget.cpp #1068296:1068297
@@ -164,7 +164,7 @@
   m_pixmap = ImageFactory::pixmap(id_, MAX_UNSCALED_WIDTH, MAX_UNSCALED_HEIGHT);
   const bool link = ImageFactory::imageInfo(id_).linkOnly;
   m_cbLinkOnly->setChecked(link);
-  m_cbLinkOnly->setEnabled(link);
+  m_cbLinkOnly->setEnabled(link); // user can't make a non;-linked image a linked image, so disable if not linked
   // if we're using a link, then the original URL _is_ the id
   m_originalURL = link ? KUrl(id_) : KUrl();
   m_scaled = QPixmap();
@@ -326,9 +326,9 @@
     return;
   }
 
-  bool link = m_cbLinkOnly->isChecked();
+  const bool link = m_cbLinkOnly->isChecked();
   // if the user is trying to link and can't before there's no information about the url
-  // the let him know that
+  // then let him know that
   if(link && m_originalURL.isEmpty()) {
     KMessageBox::sorry(this, i18n("Saving a link is only possible for newly added images."));
     m_cbLinkOnly->setChecked(false);
--- trunk/extragear/office/tellico/src/images/CMakeLists.txt #1068296:1068297
@@ -6,6 +6,10 @@
    )
 
 KDE4_ADD_LIBRARY(images STATIC ${images_STAT_SRCS})
+TARGET_LINK_LIBRARIES(images
+    core
+    gui
+)
 # the following linking seems to be necessary for the KDE build dashboard to succeed
 TARGET_LINK_LIBRARIES(images
     ${QIMAGEBLITZ_LIBRARIES}
--- trunk/extragear/office/tellico/src/images/image.cpp #1068296:1068297
@@ -124,7 +124,8 @@
 }
 
 void Image::setID(const QString& id_) {
-  m_id = idClean(id_);
+  // don't clean the id if we're linking only
+  m_id = m_linkOnly ? id_ : idClean(id_);
 }
 
 void Image::calculateID() {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic