Review Request 122197: Fixes to .ods import

Jarosław Staniek staniek at kde.org
Fri Feb 6 23:47:28 GMT 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122197/#review75550
-----------------------------------------------------------


Much better!


kexi/main/KexiMainWindow.cpp
<https://git.reviewboard.kde.org/r/122197/#comment52256>

    These 3 lines can be replaced by
    
    QString destinationTableName(args["destinationTableName"]);
    if (!destinationTableName.isEmpty()) {



kexi/migration/AlterSchemaWidget.h
<https://git.reviewboard.kde.org/r/122197/#comment52257>

    -> const QString &



kexi/migration/AlterSchemaWidget.h
<https://git.reviewboard.kde.org/r/122197/#comment52258>

    -> const QString &



kexi/migration/AlterSchemaTableModel.cpp
<https://git.reviewboard.kde.org/r/122197/#comment52262>

    3 -> ROWS_FOR_PREVIEW



kexi/migration/AlterSchemaWidget.cpp
<https://git.reviewboard.kde.org/r/122197/#comment52267>

    ah this still crashes the same way, see ctor for a fix



kexi/migration/AlterSchemaWidget.cpp
<https://git.reviewboard.kde.org/r/122197/#comment52269>

    Ah this still crases, please revert and see ctor.



kexi/migration/AlterSchemaWidget.cpp
<https://git.reviewboard.kde.org/r/122197/#comment52268>

    ->
    
    delete m_table;
    delete m_model;



kexi/migration/AlterSchemaWidget.cpp
<https://git.reviewboard.kde.org/r/122197/#comment52264>

    this way I've got e.g.
    
    Caption: simple Sheet1
    Name: simple_sheet14
    
    --> caption does not match
    
    Works ok (http://i.imgur.com/P0hbf9C.png) if we change to:
    m_tableNameWidget->setCaptionText(suggestedItemName(suggestedCaption));
    
    and then m_tableNameWidget->setNameText() line can be removed because name is auto-filled when we call setCaptionText()



kexi/migration/AlterSchemaWidget.cpp
<https://git.reviewboard.kde.org/r/122197/#comment52265>

    rename to suggestedItemCaption(const QString& baseCaption)



kexi/migration/AlterSchemaWidget.cpp
<https://git.reviewboard.kde.org/r/122197/#comment52266>

    we're checking the caption, so:
    
    -> if (nameExists(KexiUtils::stringToIdentifier(new_name))) {



kexi/migration/importtablewizard.cpp
<https://git.reviewboard.kde.org/r/122197/#comment52263>

    Can create multiple connects. I guess Qt::UniqueConnection is needed.



kexi/migration/importtablewizard.cpp
<https://git.reviewboard.kde.org/r/122197/#comment52259>

    Easier could be with use of QFileInfo::fileName() and QFileInfo::baseName()



kexi/migration/importtablewizard.cpp
<https://git.reviewboard.kde.org/r/122197/#comment52261>

    use i18nc("<basename-filenbame> <tablename>", "%1 %2") -- RTL-friendly



kexi/migration/importtablewizard.cpp
<https://git.reviewboard.kde.org/r/122197/#comment52260>

    this isn't the original table/sheet name, m_importTableName is


One issue: 
1. Go to "Alter the Detected Table Design"
2. Click Back
3. Go to "Alter the Detected Table Design" again
4. Result: extra column is added every time you come back to the "Alter the Detected Table Design" page.

- Jarosław Staniek


On Feb. 6, 2015, 7:30 p.m., Roman Shtemberko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122197/
> -----------------------------------------------------------
> 
> (Updated Feb. 6, 2015, 7:30 p.m.)
> 
> 
> Review request for Calligra, Adam Pigg, Jarosław Staniek, Radosław Wicik, and Wojciech Kosowicz.
> 
> 
> Bugs: 336815
>     http://bugs.kde.org/show_bug.cgi?id=336815
> 
> 
> Repository: calligra
> 
> 
> Description
> -------
> 
> Fix 336815 (path issue)
> Also have fixed with this patch:
> Check for an empty name.
> Names are no more converted to the lower case (there is some conflicts with this behavior, imported tables can not be opened after this (only after restarting an app (!?)))
> Check if name is not starting with a digit (conflicts with '_' at the begining as well).
> Default name is added based on sheet selected.
> 
> 
> Diffs
> -----
> 
>   kexi/migration/AlterSchemaWidget.cpp ea7fedd 
>   kexi/migration/importtablewizard.h a0b4dca 
>   kexi/migration/importtablewizard.cpp f3d02b9 
>   kexi/plugins/migration/keximigrationpart.cpp 03c674e 
>   kexi/widget/KexiConnectionSelectorWidget.cpp 48d3f7e 
>   kexi/main/KexiMainWindow.cpp f499951 
>   kexi/migration/AlterSchemaTableModel.h 2090b35 
>   kexi/migration/AlterSchemaTableModel.cpp 86ef62e 
>   kexi/migration/AlterSchemaWidget.h b29e7f9 
> 
> Diff: https://git.reviewboard.kde.org/r/122197/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Roman Shtemberko
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20150206/8ebba937/attachment.htm>


More information about the calligra-devel mailing list