Commit 265965da authored by Ronan Abhamon's avatar Ronan Abhamon

fix(app): coding style & log app startup

parent 59c0154f
...@@ -61,6 +61,8 @@ App::App (int &argc, char **argv) : QApplication(argc, argv) { ...@@ -61,6 +61,8 @@ App::App (int &argc, char **argv) : QApplication(argc, argv) {
// ------------------------------------------------------------------- // -------------------------------------------------------------------
void App::initContentApp () { void App::initContentApp () {
qInfo() << "Initializing core manager...";
// Init core. // Init core.
CoreManager::init(); CoreManager::init();
...@@ -69,6 +71,7 @@ void App::initContentApp () { ...@@ -69,6 +71,7 @@ void App::initContentApp () {
addContextProperties(); addContextProperties();
// Load main view. // Load main view.
qInfo() << "Loading main view...";
m_engine.load(QUrl(QML_VIEW_MAIN_WINDOW)); m_engine.load(QUrl(QML_VIEW_MAIN_WINDOW));
if (m_engine.rootObjects().isEmpty()) if (m_engine.rootObjects().isEmpty())
qFatal("Unable to open main window."); qFatal("Unable to open main window.");
...@@ -81,6 +84,8 @@ void App::initContentApp () { ...@@ -81,6 +84,8 @@ void App::initContentApp () {
} }
void App::registerTypes () { void App::registerTypes () {
qInfo() << "Registering types...";
// Register meta types. // Register meta types.
qmlRegisterUncreatableType<Presence>( qmlRegisterUncreatableType<Presence>(
"Linphone", 1, 0, "Presence", "Presence is uncreatable" "Linphone", 1, 0, "Presence", "Presence is uncreatable"
...@@ -143,13 +148,15 @@ void App::registerTypes () { ...@@ -143,13 +148,15 @@ void App::registerTypes () {
} }
void App::addContextProperties () { void App::addContextProperties () {
qInfo() << "Adding context properties...";
QQmlContext *context = m_engine.rootContext(); QQmlContext *context = m_engine.rootContext();
QQmlComponent component(&m_engine, QUrl(QML_VIEW_CALL_WINDOW));
// Windows. QQmlComponent component(&m_engine, QUrl(QML_VIEW_CALL_WINDOW));
if (component.isError()) if (component.isError()) {
qWarning() << component.errors(); qWarning() << component.errors();
else abort();
}
context->setContextProperty("CallsWindow", component.create()); context->setContextProperty("CallsWindow", component.create());
m_notifier = new Notifier(); m_notifier = new Notifier();
......
...@@ -20,7 +20,7 @@ QHash<int, QByteArray> ChatModel::roleNames () const { ...@@ -20,7 +20,7 @@ QHash<int, QByteArray> ChatModel::roleNames () const {
return roles; return roles;
} }
int ChatModel::rowCount (const QModelIndex&) const { int ChatModel::rowCount (const QModelIndex &) const {
return m_entries.count(); return m_entries.count();
} }
...@@ -40,7 +40,7 @@ QVariant ChatModel::data (const QModelIndex &index, int role) const { ...@@ -40,7 +40,7 @@ QVariant ChatModel::data (const QModelIndex &index, int role) const {
return QVariant(); return QVariant();
} }
bool ChatModel::removeRow (int row, const QModelIndex&) { bool ChatModel::removeRow (int row, const QModelIndex &) {
return removeRows(row, 1); return removeRows(row, 1);
} }
......
...@@ -49,7 +49,7 @@ private: ...@@ -49,7 +49,7 @@ private:
// and reused by `lessThan`. // and reused by `lessThan`.
mutable QHash<const ContactModel *, unsigned int> m_weights; mutable QHash<const ContactModel *, unsigned int> m_weights;
bool m_use_connected_filter; bool m_use_connected_filter = false;
static const QRegExp m_search_separators; static const QRegExp m_search_separators;
......
...@@ -132,12 +132,12 @@ RowLayout { ...@@ -132,12 +132,12 @@ RowLayout {
} }
padding: ListFormStyle.value.text.padding padding: ListFormStyle.value.text.padding
visible: values.model.count === 0 // TODO: placeholder click machin visible: values.model.count === 0
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: _addValue('') onClicked: !listForm.readOnly && _addValue('')
} }
} }
......
...@@ -5,7 +5,6 @@ import QtQuick.Layouts 1.3 ...@@ -5,7 +5,6 @@ import QtQuick.Layouts 1.3
import Common 1.0 import Common 1.0
import Linphone 1.0 import Linphone 1.0
import Linphone.Styles 1.0 import Linphone.Styles 1.0
import Utils 1.0
// =================================================================== // ===================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment