mirror of
				https://github.com/fralx/LimeReport.git
				synced 2025-11-04 15:11:26 +03:00 
			
		
		
		
	removed sort case sensitivity
This commit is contained in:
		@@ -81,7 +81,7 @@ private:
 | 
			
		||||
    bool m_resetPageNumber;
 | 
			
		||||
    QString m_condition;
 | 
			
		||||
    QString m_conditionValue;
 | 
			
		||||
    Qt::SortOrder m_sortFieldNameBy;
 | 
			
		||||
    Qt::SortOrder m_sortFieldNameBy = Qt::AscendingOrder;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class GroupBandFooter : public BandDesignIntf{
 | 
			
		||||
 
 | 
			
		||||
@@ -199,6 +199,7 @@ ModelToDataSource::ModelToDataSource(QAbstractItemModel* model, bool owned)
 | 
			
		||||
            model->fetchMore(QModelIndex());
 | 
			
		||||
            if (model->rowCount() <= 0) break;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        connect(model, SIGNAL(destroyed()), this, SLOT(slotModelDestroed()));
 | 
			
		||||
        connect(model, SIGNAL(modelReset()), this, SIGNAL(modelStateChanged()));
 | 
			
		||||
    }
 | 
			
		||||
@@ -306,6 +307,12 @@ int ModelToDataSource::columnCount()
 | 
			
		||||
    return m_model->columnCount();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int ModelToDataSource::rowCount()
 | 
			
		||||
{
 | 
			
		||||
    if (isInvalid()) return 0;
 | 
			
		||||
    return m_model->rowCount();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QString ModelToDataSource::columnNameByIndex(int columnIndex)
 | 
			
		||||
{
 | 
			
		||||
    if (isInvalid()) return "";
 | 
			
		||||
 
 | 
			
		||||
@@ -107,7 +107,7 @@ public:
 | 
			
		||||
    void    setPort(QString port);
 | 
			
		||||
public:
 | 
			
		||||
    static QString connectionNameForUser(const QString& connectionName);
 | 
			
		||||
    static QString connectionNameForReport(const QString& connectionName);    
 | 
			
		||||
    static QString connectionNameForReport(const QString& connectionName);
 | 
			
		||||
signals:
 | 
			
		||||
    void nameChanged(const QString& oldName,const QString& newName);
 | 
			
		||||
private:
 | 
			
		||||
@@ -325,7 +325,7 @@ private:
 | 
			
		||||
    QString m_name;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class MasterDetailProxyModel : public QSortFilterProxyModel{    
 | 
			
		||||
class MasterDetailProxyModel : public QSortFilterProxyModel{
 | 
			
		||||
    Q_OBJECT
 | 
			
		||||
public:
 | 
			
		||||
    MasterDetailProxyModel(DataSourceManager* dataManager):m_maps(0),m_dataManager(dataManager){}
 | 
			
		||||
@@ -392,6 +392,7 @@ public:
 | 
			
		||||
    QVariant dataByRowIndex(const QString &columnName, int rowIndex, const QString &roleName);
 | 
			
		||||
    QVariant dataByKeyField(const QString& columnName, const QString& keyColumnName, QVariant keyData);
 | 
			
		||||
    int columnCount();
 | 
			
		||||
    int rowCount();
 | 
			
		||||
    QString columnNameByIndex(int columnIndex);
 | 
			
		||||
    int columnIndexByName(QString name);
 | 
			
		||||
    QVariant headerData(const QString &columnName, const QString &roleName);
 | 
			
		||||
 
 | 
			
		||||
@@ -181,6 +181,7 @@ void ReportRender::initDatasources(){
 | 
			
		||||
void ReportRender::initDatasource(const QString& name){
 | 
			
		||||
    try{
 | 
			
		||||
        if (datasources()->containsDatasource(name)){
 | 
			
		||||
            if(m_dataSourceSorted)return;
 | 
			
		||||
            IDataSource* ds = datasources()->dataSource(name);
 | 
			
		||||
            if (ds)
 | 
			
		||||
                ds->first();
 | 
			
		||||
@@ -259,8 +260,10 @@ void ReportRender::renderPage(PageItemDesignIntf* patternPage, bool isTOC, bool
 | 
			
		||||
    clearPageMap();
 | 
			
		||||
 | 
			
		||||
    try{
 | 
			
		||||
 | 
			
		||||
        datasources()->setAllDatasourcesToFirst();
 | 
			
		||||
        datasources()->clearGroupFuntionsExpressions();
 | 
			
		||||
 | 
			
		||||
    } catch(ReportError &exception){
 | 
			
		||||
        //TODO possible should thow exeption
 | 
			
		||||
        QMessageBox::critical(0,tr("Error"),exception.what());
 | 
			
		||||
@@ -274,6 +277,7 @@ void ReportRender::renderPage(PageItemDesignIntf* patternPage, bool isTOC, bool
 | 
			
		||||
    m_dataSourceSorted = false;
 | 
			
		||||
    BandDesignIntf* lastRenderedBand = 0;
 | 
			
		||||
    for (int i=0;i<m_patternPageItem->dataBandCount() && !m_renderCanceled; i++){
 | 
			
		||||
 | 
			
		||||
        lastRenderedBand = m_patternPageItem->dataBandAt(i);
 | 
			
		||||
        initDatasource(lastRenderedBand->datasourceName());
 | 
			
		||||
        renderDataBand(lastRenderedBand);
 | 
			
		||||
@@ -696,7 +700,6 @@ void ReportRender::renderDataBand(BandDesignIntf *dataBand)
 | 
			
		||||
 | 
			
		||||
    IDataSource* bandDatasource = 0;
 | 
			
		||||
    m_lastRenderedFooter = 0;
 | 
			
		||||
 | 
			
		||||
    if (!dataBand->datasourceName().isEmpty())
 | 
			
		||||
        bandDatasource = datasources()->dataSource(dataBand->datasourceName());
 | 
			
		||||
 | 
			
		||||
@@ -968,10 +971,12 @@ void ReportRender::renderGroupHeader(BandDesignIntf *parentBand, IDataSource* da
 | 
			
		||||
    GroupBandHeader *group = dynamic_cast<GroupBandHeader*>(parentBand);
 | 
			
		||||
    if(dataSource->model() && group && !group->groupFieldName().isEmpty() && !m_dataSourceSorted)
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        MasterDetailProxyModel *proxyModel = static_cast<MasterDetailProxyModel*>(dataSource->model());
 | 
			
		||||
 | 
			
		||||
        if(proxyModel)
 | 
			
		||||
        {
 | 
			
		||||
            proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
 | 
			
		||||
            //proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
 | 
			
		||||
 | 
			
		||||
            proxyModel->sort(dataSource->columnIndexByName(group->groupFieldName()),group->SortFieldNameBy());
 | 
			
		||||
            m_dataSourceSorted = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -830,8 +830,8 @@ p, li { white-space: pre-wrap; }
 | 
			
		||||
<context>
 | 
			
		||||
    <name>LimeReport::ConnectionDesc</name>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="402"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="407"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="409"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="414"/>
 | 
			
		||||
        <source>defaultConnection</source>
 | 
			
		||||
        <translation>Connexion par défaut</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
@@ -1946,12 +1946,12 @@ p, li { white-space: pre-wrap; }
 | 
			
		||||
<context>
 | 
			
		||||
    <name>LimeReport::MasterDetailProxyModel</name>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="623"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="630"/>
 | 
			
		||||
        <source>Field: "%1" not found in "%2" child datasource</source>
 | 
			
		||||
        <translation>Le champ: "%1"est introuvable dans la source de donnée enfant "%2"</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="637"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="644"/>
 | 
			
		||||
        <source>Field: "%1" not found in "%2" master datasource</source>
 | 
			
		||||
        <translation>Le champ: "%1"est introuvable dans la source de donnée principale "%2"</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
@@ -1959,7 +1959,7 @@ p, li { white-space: pre-wrap; }
 | 
			
		||||
<context>
 | 
			
		||||
    <name>LimeReport::ModelToDataSource</name>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="363"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="370"/>
 | 
			
		||||
        <source>model is destroyed</source>
 | 
			
		||||
        <translation>Le modèle a été supprimé</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
@@ -2398,7 +2398,7 @@ p, li { white-space: pre-wrap; }
 | 
			
		||||
<context>
 | 
			
		||||
    <name>LimeReport::ProxyHolder</name>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="562"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="569"/>
 | 
			
		||||
        <source>Datasource has been invalidated</source>
 | 
			
		||||
        <translation>La source de donnée n'a pas été validée</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
@@ -3604,25 +3604,25 @@ Cet aperçu n'est plus valide.</translation>
 | 
			
		||||
    <name>LimeReport::ReportRender</name>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="176"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="189"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="266"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="190"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="269"/>
 | 
			
		||||
        <source>Error</source>
 | 
			
		||||
        <translation>Erreur</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="303"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="307"/>
 | 
			
		||||
        <source>page index out of range</source>
 | 
			
		||||
        <translation>Indice de la page dépassé</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="431"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="468"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="435"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="472"/>
 | 
			
		||||
        <source>Databand "%1" not found</source>
 | 
			
		||||
        <translation>Bande de données "%1 introuvable</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="439"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="475"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="443"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="479"/>
 | 
			
		||||
        <source>Wrong using function %1</source>
 | 
			
		||||
        <translation>Utilisation incorrecte de la fonction "%1"</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
@@ -4543,27 +4543,27 @@ Cet aperçu n'est plus valide.</translation>
 | 
			
		||||
        <translation>Connexion invalidé %1</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="450"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="457"/>
 | 
			
		||||
        <source>Master datasource "%1" not found!</source>
 | 
			
		||||
        <translation>Source de donnée principale "%1" introuvable!</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="533"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="540"/>
 | 
			
		||||
        <source>Master datasouce "%1" not found!</source>
 | 
			
		||||
        <translation>Source de donnée principale "%1" introuvable!</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="534"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="541"/>
 | 
			
		||||
        <source>Child</source>
 | 
			
		||||
        <translation>Enfant</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="534"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="541"/>
 | 
			
		||||
        <source> and child </source>
 | 
			
		||||
        <translation> est enfant </translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="535"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="542"/>
 | 
			
		||||
        <source>datasouce "%1" not found!</source>
 | 
			
		||||
        <translation>Source de donnée "%1" introuvable!</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
 
 | 
			
		||||
@@ -842,8 +842,8 @@ p, li { white-space: pre-wrap; }
 | 
			
		||||
<context>
 | 
			
		||||
    <name>LimeReport::ConnectionDesc</name>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="402"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="407"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="409"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="414"/>
 | 
			
		||||
        <source>defaultConnection</source>
 | 
			
		||||
        <translation>Domyślne połączenie</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
@@ -1958,12 +1958,12 @@ p, li { white-space: pre-wrap; }
 | 
			
		||||
<context>
 | 
			
		||||
    <name>LimeReport::MasterDetailProxyModel</name>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="623"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="630"/>
 | 
			
		||||
        <source>Field: "%1" not found in "%2" child datasource</source>
 | 
			
		||||
        <translation>Pole: "%1" nie znalezione w "%2" źródle danch dziecka</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="637"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="644"/>
 | 
			
		||||
        <source>Field: "%1" not found in "%2" master datasource</source>
 | 
			
		||||
        <translation>Pole: "%1" nie znalezione w "%2" głównym źródle danch</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
@@ -1971,7 +1971,7 @@ p, li { white-space: pre-wrap; }
 | 
			
		||||
<context>
 | 
			
		||||
    <name>LimeReport::ModelToDataSource</name>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="363"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="370"/>
 | 
			
		||||
        <source>model is destroyed</source>
 | 
			
		||||
        <translation>Model danych jest zniszczony</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
@@ -2410,7 +2410,7 @@ p, li { white-space: pre-wrap; }
 | 
			
		||||
<context>
 | 
			
		||||
    <name>LimeReport::ProxyHolder</name>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="562"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="569"/>
 | 
			
		||||
        <source>Datasource has been invalidated</source>
 | 
			
		||||
        <translation>Źródło danych zostało unieważnione</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
@@ -3616,25 +3616,25 @@ Ten podgląd nie jest już prawidłowy.</translation>
 | 
			
		||||
    <name>LimeReport::ReportRender</name>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="176"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="189"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="266"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="190"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="269"/>
 | 
			
		||||
        <source>Error</source>
 | 
			
		||||
        <translation>Błąd</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="303"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="307"/>
 | 
			
		||||
        <source>page index out of range</source>
 | 
			
		||||
        <translation>indeks strony poza zakresem</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="431"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="468"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="435"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="472"/>
 | 
			
		||||
        <source>Databand "%1" not found</source>
 | 
			
		||||
        <translation>Sekcja danych "%1" nie znaleziona</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="439"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="475"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="443"/>
 | 
			
		||||
        <location filename="../limereport/lrreportrender.cpp" line="479"/>
 | 
			
		||||
        <source>Wrong using function %1</source>
 | 
			
		||||
        <translation>Złe użycie funkcji %1</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
@@ -4555,27 +4555,27 @@ Ten podgląd nie jest już prawidłowy.</translation>
 | 
			
		||||
        <translation>Nieprawidłowe połączenie! %1</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="450"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="457"/>
 | 
			
		||||
        <source>Master datasource "%1" not found!</source>
 | 
			
		||||
        <translation>Nie znaleziono głównego źródła danych "%1"!</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="533"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="540"/>
 | 
			
		||||
        <source>Master datasouce "%1" not found!</source>
 | 
			
		||||
        <translation>Nie znaleziono głównego źródła danych "%1"!</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="534"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="541"/>
 | 
			
		||||
        <source>Child</source>
 | 
			
		||||
        <translation>Dziecko</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="534"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="541"/>
 | 
			
		||||
        <source> and child </source>
 | 
			
		||||
        <translation> i dziecko </translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="535"/>
 | 
			
		||||
        <location filename="../limereport/lrdatadesignintf.cpp" line="542"/>
 | 
			
		||||
        <source>datasouce "%1" not found!</source>
 | 
			
		||||
        <translation>nie znaleziono źródła danych "%1"!</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user