Skip to content

Commit

Permalink
Merge branch 'master' of github.com:livecv/livecv into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dinusv committed Mar 13, 2017
2 parents 397e572 + ba5913d commit 8bcacb8
Show file tree
Hide file tree
Showing 15 changed files with 178 additions and 42 deletions.
84 changes: 84 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
language: cpp

os:
- linux

sudo: required
dist: trusty

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
- g++-5
- build-essential
- cmake
- cmake-data
- git
- libgtk2.0-dev
- pkg-config
- libavcodec-dev
- libavformat-dev
- libswscale-dev
- python-dev
- python-numpy
- libtbb2
- libtbb-dev
- libjpeg-dev
- libpng-dev
- libjasper-dev
- libdc1394-22-dev
- unzip

#env: GCC_VERSION=5 CPP=11 COMPILER=g++-5 CXX=g++-5 CC=gcc-5

install:
- sudo apt-get install -y libtiff5 libtiff5-dev
# - sudo unlink /usr/bin/gcc && sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc
# - sudo unlink /usr/bin/g++ && sudo ln -s /usr/bin/g++-5 /usr/bin/g++
- git clone https://github.com/Itseez/opencv.git
- cd opencv
- mkdir build
- cd build
- cmake ..
- make -j8
- sudo make -j8 install
- export OPENCV_DIR=/usr/local/lib
- cd ../../build
- wget https://github.com/livecv/livecv-deploy-kit/archive/master.zip
- unzip master.zip
- mv livecv-deploy-kit-master/* .
- wget http://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-linux-x64-5.7.0.run
- sudo chmod 777 qt-opensource-linux-x64-5.7.0.run
- ./qt-opensource-linux-x64-5.7.0.run --script resources/install-qt.qs --verbose --silent -platform minimal
- export QTDIR=/opt/qt/5.7/gcc_64


script:
- ls
- python3 livecv_build.py
- ls
- python3 livecv_deploy.py -d gcc
- python3 livecv_deploy.py -d gcc_standalone

before_deploy:
- ls
- ls *.tar.gz
- export LIVECV_STANDALONE=$(ls *.tar.gz | tail -n +1 | head -1)
- export LIVECV=$(ls *.tar.gz | tail -n +2 | head -1)
- echo ${LIVECV_STANDALONE}
- echo ${LIVECV}

deploy:
provider: releases
api_key:
- secure: "uoyLbdtkGr8IDnyECv747iVkAsxMdqQR1v9wfwbEj4lsSHZ2E+Y3ShZMmV2AZUK86ajksBOvfMUYVo8P2JTQUsQtduu9SAIFF2MxxIVQbwmdF27cvnSUDFQjkU6h2UDNbgdi2I6rtH2g1Adhx/C45my0NQdvbhB9fEV3H+Z8g0YmoBDu3MZFGZknpf/PpNzaoGtHATo+0VooqCrAZhR9M1igGQF2ibU8z8E9xm04ehSjlMoXWv15GWmwOmkjQSe/mkeOUJ9Bl2LuIk3PcIv7uJNle5GgteQM+++iru59kZSXTLqih2peZVT7BLQ3c4gUZCtLASFPXwoQH2n4VMz4OeGv4b9LMw9bvwQ+eM8//enDDyIy2fP6KQu2BdLIScNX6B4eitxVMEcOXRHOc4xmlXqNloCOtGONaZ7w3OnwPj/O38ThM8c4riq1sh1TFBabRge8VGkBiKU3cDYPdGM2uMxST0swcrgBqu0UZ45xCftbF1tqJjs6K6ZS1v298KVlHcxyfdSJTDKCEOyTJXH6at2yYhQZ9RKrimZE5aiK0h3dsflKrmMXKDWWmQmAB7WxRQhNjEDuULvhq0f5z+oLDbL1hGSYM09196fyUDLeRY7wdYoIVaH3ebk5j6b+ar9RaQ16MoERBxR1ULUcs5gJHxCWPwyb4jRZBeMJJwzNF3Q="
file_glob: true
file:
- "${LIVECV_STANDALONE}"
- "${LIVECV}"
skip_cleanup: true
on:
tags: true
1 change: 1 addition & 0 deletions 3rdparty/opencvconfig.pro
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ win32{

defineTest(deployOpenCV){
copyCvDll($${OPENCV_DIR_DLLS}/opencv_world$${OPENCV_VERSION}.dll)
copyCvDll($${OPENCV_DIR_DLLS}/opencv_ffmpeg$${OPENCV_VERSION_FIND}_64.dll)
}
}

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
![Live CV](/doc/src/images/logo-dark.png)

[![Join the chat at https://gitter.im/dinusv/livecv](https://badges.gitter.im/dinusv/livecv.svg)](https://gitter.im/dinusv/livecv?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/livecv/livecv.svg?branch=master)](https://travis-ci.org/livecv/livecv)
[![Build status](https://ci.appveyor.com/api/projects/status/c1kk7crl0wiox16b?svg=true)](https://ci.appveyor.com/project/dinusv/livecv)

* **Version**: 1.3.0
* **License**: LGPL
Expand Down
2 changes: 2 additions & 0 deletions application/qml/LogWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,13 @@ Window {
if ( logScroll.flickableItem.contentHeight > logScroll.height )
logScroll.flickableItem.contentY = logScroll.flickableItem.contentHeight - logScroll.height
}
selectByMouse: true
textFormat: Text.RichText
readOnly: true
font.family: "Source Code Pro, Ubuntu Mono, Courier New, Courier"
font.pixelSize: 12
color : "#eee"
selectionColor: "#333"
}

}
Expand Down
12 changes: 6 additions & 6 deletions application/src/base/qlivecvlog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,33 @@ QLiveCVLog::~QLiveCVLog(){
delete m_logFile;
}

void QLiveCVLog::logMessage(QtMsgType type, const QMessageLogContext&, const QString& msg){
void QLiveCVLog::logMessage(QtMsgType type, const QMessageLogContext&, QString msg){
m_logMutex.lock();
switch (type){
case QtInfoMsg:
if ( isFileLogEnabled() )
m_textStream << "Info : " << msg << "\n";
m_data.append(msg + "<br/>");
m_data.append(msg.replace("\n","<br/>") + "<br/>");
break;
case QtDebugMsg:
if ( isFileLogEnabled() )
m_textStream << "Debug : " << msg << "\n";
m_data.append(msg + "<br/>");
m_data.append(msg.replace("\n","<br/>") + "<br/>");
break;
case QtWarningMsg:
if ( isFileLogEnabled() )
m_textStream << "Warning : " << msg << "\n";
m_data.append("<span style=\"color : #ffff00;\">" + msg + "</span><br/>");
m_data.append("<span style=\"color : #ffff00;\">" + msg.replace("\n","<br/>") + "</span><br/>");
break;
case QtCriticalMsg:
if ( isFileLogEnabled() )
m_textStream << "Critical : " << msg;
m_data.append("<span style=\"color : #cc3333;\">" + msg + "</span><br/>");
m_data.append("<span style=\"color : #cc3333;\">" + msg.replace("\n","<br/>") + "</span><br/>");
break;
case QtFatalMsg:
if ( isFileLogEnabled() )
m_textStream << "Fatal : " << msg;
m_data.append("<span style=\"color : #ff0000;\">" + msg + "</span><br/>");
m_data.append("<span style=\"color : #ff0000;\">" + msg.replace("\n","<br/>") + "</span><br/>");
break;
}
m_logMutex.unlock();
Expand Down
2 changes: 1 addition & 1 deletion application/src/base/qlivecvlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class QLiveCVLog : public QObject{
void dataChanged();

public slots:
void logMessage(QtMsgType type, const QMessageLogContext& ctx, const QString& msg);
void logMessage(QtMsgType type, const QMessageLogContext& ctx, QString msg);

private:
QString m_data;
Expand Down
55 changes: 55 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
os: unstable

platform:
- x64

environment:
matrix:
- PYTHON: "C:\\Python35"
PYTHON_VERSION: "3.5.0"
PYTHON_ARCH: "32"

install:
- choco install opencv -version 3.1.0.20160701

before_build:
- SET ARCH=x64
- SET APP_PATH=%CD%
- IF EXIST C:\tools\OpenCV* CD C:\tools*
- SET OPENCV_ROOT_PATH=%CD%\opencv
- CD %APP_PATH%
- SET OPENCV_DIR=%OPENCV_ROOT_PATH%\build\%ARCH%\vc12
- SET QTDIR=C:\Qt\5.7\msvc2013_64

build_script:
- cd build
- echo %OPENCV_DIR%
- echo %QTDIR%
- ps: $file = "$pwd\deploy.zip"
- ps: (new-object System.Net.WebClient).Downloadfile("https://github.com/livecv/livecv-deploy-kit/archive/master.zip", $file)
- ps: 7z x -y $file -o"."
- SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
- mv livecv-deploy-kit-master/* .
- python --version
- python livecv_build.py -b 64
- python livecv_deploy.py -b 64
- dir

artifacts:
- path: 'build\livecv-*.zip'
name: Release

deploy:
release: $(APPVEYOR_REPO_TAG_NAME)
description: 'View Changelog.md for further details.'
provider: GitHub
auth_token:
secure: 'ewCMPMl6d/IVBZ0r/ZApqeh0NgF/0UMMtKTqvQcmTNFb3uK57XFyqbZBHLDICAVC'
artifact: /.*\.zip/
draft: true
prerelease: false
on:
branch: master # release from master branch only
appveyor_repo_tag: true


1 change: 1 addition & 0 deletions editor/lcveditor/src/qdocumentcodeinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ void QDocumentCodeInterface::setDocument(QProjectDocument *document){

void QDocumentCodeInterface::generateCompletion(int cursorPosition){
if ( m_target && m_codeHandler ){
m_lastChar = QChar();
QTextCursor cursor(m_target->textDocument());
cursor.setPosition(cursorPosition);
QTextCursor newCursor;
Expand Down
8 changes: 6 additions & 2 deletions editor/qmljsparser/src/qdocumentqmlhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,12 @@ void QDocumentQmlHandler::assistCompletion(
model->setSuggestions(suggestions, filter);
}
} else if ( ctx->context() & QQmlCompletionContext::InImport ){
suggestionsForImport(*ctx, suggestions);
model->setSuggestions(suggestions, filter);
if ( ctx->context() & QQmlCompletionContext::InImportVersion ){
model->setSuggestions(suggestions, filter);
} else {
suggestionsForImport(*ctx, suggestions);
model->setSuggestions(suggestions, filter);
}
} else if ( ctx->context() & QQmlCompletionContext::InAfterOnLhsOfBinding ){
suggestionsForLeftSignalBind(*ctx, cursor.position(), suggestions);
model->setSuggestions(suggestions, filter);
Expand Down
2 changes: 2 additions & 0 deletions editor/qmljsparser/src/qprojectqmlscope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ void QProjectQmlScope::findQmlLibraryInImports(
versionMinor,
newPaths
);
if ( !newPaths.isEmpty() ) // avoid duplicates in multiple import paths
break;
}

if ( !newPaths.isEmpty() )
Expand Down
2 changes: 2 additions & 0 deletions editor/qmljsparser/src/qqmlcompletioncontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ QString QQmlCompletionContext::contextString() const{
QString base;
if ( m_context & QQmlCompletionContext::InImport)
base += "InImport";
if ( m_context & QQmlCompletionContext::InImportVersion)
base += base.isEmpty() ? "InImportVersion" : " | InImportVersion";
if ( m_context & QQmlCompletionContext::InQml)
base += base.isEmpty() ? "InQml" : " | InQml";
if ( m_context & QQmlCompletionContext::InLhsOfBinding)
Expand Down
11 changes: 6 additions & 5 deletions editor/qmljsparser/src/qqmlcompletioncontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ class Q_QMLJSPARSER_EXPORT QQmlCompletionContext : public QCodeCompletionContext
public:
enum Context{
InImport = 1,
InQml = 2,
InLhsOfBinding = 4,
InRhsofBinding = 8,
InAfterOnLhsOfBinding = 16,
InStringLiteral = 32,
InImportVersion = 2,
InQml = 4,
InLhsOfBinding = 8,
InRhsofBinding = 16,
InAfterOnLhsOfBinding = 32,
InStringLiteral = 64,
};

public:
Expand Down
10 changes: 9 additions & 1 deletion editor/qmljsparser/src/qqmlcompletioncontextfinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,18 @@ QQmlCompletionContext *QQmlCompletionContextFinder::getContext(const QTextCursor
ExpressionUnderCursor euc;
euc(cursor, &path);
}
QStringList objectTypePath = finder.qmlObjectTypeName();

if ( finder.isInImport() && !finder.libVersionImport().isEmpty() ){
if ( path.isEmpty() ){
context |= QQmlCompletionContext::InImportVersion;
objectTypePath = finder.libVersionImport().split(".");
}
}

return new QQmlCompletionContext(
context,
finder.qmlObjectTypeName(),
objectTypePath,
finder.bindingPropertyName(),
path
);
Expand Down
15 changes: 1 addition & 14 deletions plugins/lcvphoto/src/qdenoisetvl1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@
**
****************************************************************************/

/****************************************************************************
**
** This file is part of Live CV Application.
**
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl.html.
**
****************************************************************************/
#include "qdenoisetvl1.h"
#include "opencv2/photo.hpp"

Expand Down Expand Up @@ -76,7 +63,7 @@ void QDenoiseTvl1::setBufferSize(int bufferSize){

void QDenoiseTvl1::trimBuffer(int size){
if (m_matBuffer.size() > static_cast<std::size_t>(size)){
int elementsToDelete = m_matBuffer.size() - size;
size_t elementsToDelete = m_matBuffer.size() - size;
m_matBuffer.erase(m_matBuffer.begin(), m_matBuffer.begin() + elementsToDelete);
}
}
Expand Down
13 changes: 0 additions & 13 deletions plugins/lcvphoto/src/qdenoisetvl1.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@
**
****************************************************************************/

/****************************************************************************
**
** This file is part of Live CV Application.
**
** GNU Lesser General Public License Usage
** This file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl.html.
**
****************************************************************************/
#ifndef QDENOISETVL1_HPP
#define QDENOISETVL1_HPP

Expand Down

0 comments on commit 8bcacb8

Please sign in to comment.