Review Request 109965: Refactor assetimporters

Giorgos Tsiapaliokas terietor at gmail.com
Sun May 12 20:59:08 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109965/
-----------------------------------------------------------

(Updated May 12, 2013, 8:59 p.m.)


Review request for Plasma.


Changes
-------

In short, this update does

* s/partnerQuery/partnerID
  s/licenseQuery/licenseID
  s/languageQuery/languageID
* removes some unneeded comments
* fixes the queries [1]
* the assignment of the m_partner happens in the writeInit method and not in the ctor of the Database [2]

the long summary of this patch,

[1] the queries of the languageID and partnerId were something like 

> select name from licenses where id = 'LGPL';
> select name from partners where id = 'KDE';

but they should be

> select id from licenses where name = 'LGPL';
> select id from partners where name = 'KDE';

sorry I missed that.

[2] It used to be
Database::Database(..)
{
    m_partnerId = partnerId();
}

and it became like

Database::Database(..)
{
}

void Database::writeInit(...)
{
    m_partnerId = partnerId();
}

Q: why this change?
A: Otherwise the m_partnerId won't take the right value because the assignment of the m_partnerID
happens before the instantiation of the derived class.


Description
-------

This patch

* removes the duplicated code in assetimporters
* adds asset's size into the db
* and fixes a few small issues


Diffs (updated)
-----

  assetimporters/CMakeLists.txt 24e76a0 
  assetimporters/database-common/channelscatalog.h 5d39c02 
  assetimporters/database-common/channelscatalog.cpp 6ca0aef 
  assetimporters/database-common/database.h 9883216 
  assetimporters/database-common/database.cpp e860bdd 
  assetimporters/kdeartwork-wallpapers/CMakeLists.txt 56d19b9 
  assetimporters/kdeartwork-wallpapers/database.h 6991758 
  assetimporters/kdeartwork-wallpapers/database.cpp d75cdda 
  assetimporters/kdeartwork-wallpapers/kdewallpapersdatabase.h PRE-CREATION 
  assetimporters/kdeartwork-wallpapers/kdewallpapersdatabase.cpp PRE-CREATION 
  assetimporters/kdeartwork-wallpapers/main.cpp 708a949 
  assetimporters/obs/CMakeLists.txt 2dbcd42 
  assetimporters/obs/channelscatalog.h PRE-CREATION 
  assetimporters/obs/channelscatalog.cpp PRE-CREATION 
  assetimporters/obs/packagedatabase.h 99f4e17 
  assetimporters/obs/packagedatabase.cpp ae43b8e 
  assetimporters/projectgutenberg/CMakeLists.txt b86cc49 
  assetimporters/projectgutenberg/src/CMakeLists.txt 2d48e9c 
  assetimporters/projectgutenberg/src/database.h 8dba0ba 
  assetimporters/projectgutenberg/src/database.cpp 75cba69 
  assetimporters/projectgutenberg/src/gutenbergdatabase.h PRE-CREATION 
  assetimporters/projectgutenberg/src/gutenbergdatabase.cpp PRE-CREATION 
  assetimporters/projectgutenberg/src/main.cpp 46f2340 
  sql/bodega.sql 44f8641 

Diff: http://git.reviewboard.kde.org/r/109965/diff/


Testing
-------

I haven't noticed regression.


Thanks,

Giorgos Tsiapaliokas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20130512/fff90c75/attachment.html>


More information about the Plasma-devel mailing list