Qt-less WAM: replace qt basic data structures

Description

The scope of this is anything that is not JSON, pluggable, or the QObject signal/slot replacement.

From original patch:

#include <QByteArray>
#include <QDebug>
#include <QDir>
#include <QFile>
#include <QFileInfo>
#include <QList>
#include <QMap>
#include <QMultiMap>
#include <QPair>
#include <QString>
#include <QStringList>
#include <QTextStream>
#include <QUrl>
#include <QVariant>
#include <QtCore/QDataStream>
#include <QtCore/QDir>
#include <QtCore/QFile>
#include <QtCore/QList>
#include <QtCore/QMultiMap>
#include <QtCore/QString>
#include <QtCore/QUrl>
#include <QtCore/QUrlQuery>
#include <QtCore/QVariant>
 

  • Find mapping of Qt container to STL containers(when Qt started out, standard C++ was significantly weaker. Mapping may not be one to one mapping or even some classes won't be there in STL. )
     

QT

Standard Library/Boost

QVector

std::vector

QList

— (We should use std::vector)

QLinkedList

std::list

std::forward_list

QVarLengthArray

std::deque

std::array

QMap

std::map

QMultiMap

std::multimap

QHash

std::unordered_map

QMultiHash

std::unordered_multimap

std::set

std::multiset

QSet

std::unordered_set

std::unordered_multiset

QStringList

 -      (Using std::list<std::string>)

QLatin1String

 -      (Using std::string)

QDir

std::experimental::filesystem; (currently with GCC6.4,std::experimental::filesystem is used. After C++17 upgrade, std::filesystem can be used.)

QPair

std::pair

QVariantMap

?

QVariant

std::variant? 
It is a C++17 feature and available in GCC7(AGL EEL using GCC6.4). We even can not use it as an experimental feature.

QString("%1 + %2").arg("A").arg("B")

boost::format("%2% %1%") % A % B;

QStringList.split()

boost::split()

QUrl

boost::network::http::uri
GURL : https://chromium.googlesource.com/chromium/src/+/master/url/gurl.h

QStringLiteral

std::stringstream

 

Needs to analyzed and clarify 

  • QVariant/QVariantMap  ->  ? std::variant ? it is C++17 feature and available in GCC 7 (AGL eel using GCC 6.4)

  • QUrl ->? We need functionality like parsing URL  to get port, scheme, host. Currently, for porting activity basic functionality is implemented using our own dummy implementation. Does the use of GURL mean adding chromium as dependecy?

Rules

  • Use as much as possible of standard libraries.

  • Solution should work on Flounder (GCC 7.0) and webOS OSE (GCC 6.4).

  • Boost is allowed. That should cover string formatting, std::variant replacement, std::filesystem replacement.

  • The patches should be rebaseable on top of flounder branch (and easily rebaseable to webOS WAM master).

Environment

None

blocks

Activity

Walt Miner 
July 9, 2019 at 4:56 PM

Close for HH RC2 and GG 7.0.3

Jacobo Aragunde Pérez 
June 27, 2019 at 11:26 AM

Merged as part of parent bug .

Jacobo Aragunde Pérez 
June 17, 2019 at 8:46 AM

PR merged into WAM. Work will be merged into AGL as part of .

Nick Yamane 
May 15, 2019 at 8:00 PM

Pull requested submitted and under review at: https://github.com/webosose/wam/pull/18

Nick Yamane 
May 10, 2019 at 6:48 PM
(edited)

Currently devoting some time to get this done.

Status update:

  • Rebased my Qt-less branch on top of latest @6.agl.guppy WAM's branch

    • Fixed conflicts and removed new Qt leftovers coming from new @6.agl.guppy commits

    • Building successfully

    • Validate on RPi / Renesas M3 hw and fix regressions

Fixed

Details

Assignee

Reporter

Labels

Contract ID

Components

Priority

Created November 8, 2018 at 10:01 AM
Updated September 19, 2019 at 12:06 PM
Resolved June 27, 2019 at 11:26 AM