Skip to content

Commit 8bcacb8

Browse files
committed
Merge branch 'master' of github.com:livecv/livecv into dev
2 parents 397e572 + ba5913d commit 8bcacb8

File tree

15 files changed

+178
-42
lines changed

15 files changed

+178
-42
lines changed

.travis.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
language: cpp
2+
3+
os:
4+
- linux
5+
6+
sudo: required
7+
dist: trusty
8+
9+
addons:
10+
apt:
11+
sources:
12+
- ubuntu-toolchain-r-test
13+
packages:
14+
- gcc-5
15+
- g++-5
16+
- build-essential
17+
- cmake
18+
- cmake-data
19+
- git
20+
- libgtk2.0-dev
21+
- pkg-config
22+
- libavcodec-dev
23+
- libavformat-dev
24+
- libswscale-dev
25+
- python-dev
26+
- python-numpy
27+
- libtbb2
28+
- libtbb-dev
29+
- libjpeg-dev
30+
- libpng-dev
31+
- libjasper-dev
32+
- libdc1394-22-dev
33+
- unzip
34+
35+
#env: GCC_VERSION=5 CPP=11 COMPILER=g++-5 CXX=g++-5 CC=gcc-5
36+
37+
install:
38+
- sudo apt-get install -y libtiff5 libtiff5-dev
39+
# - sudo unlink /usr/bin/gcc && sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc
40+
# - sudo unlink /usr/bin/g++ && sudo ln -s /usr/bin/g++-5 /usr/bin/g++
41+
- git clone https://github.com/Itseez/opencv.git
42+
- cd opencv
43+
- mkdir build
44+
- cd build
45+
- cmake ..
46+
- make -j8
47+
- sudo make -j8 install
48+
- export OPENCV_DIR=/usr/local/lib
49+
- cd ../../build
50+
- wget https://github.com/livecv/livecv-deploy-kit/archive/master.zip
51+
- unzip master.zip
52+
- mv livecv-deploy-kit-master/* .
53+
- wget http://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-linux-x64-5.7.0.run
54+
- sudo chmod 777 qt-opensource-linux-x64-5.7.0.run
55+
- ./qt-opensource-linux-x64-5.7.0.run --script resources/install-qt.qs --verbose --silent -platform minimal
56+
- export QTDIR=/opt/qt/5.7/gcc_64
57+
58+
59+
script:
60+
- ls
61+
- python3 livecv_build.py
62+
- ls
63+
- python3 livecv_deploy.py -d gcc
64+
- python3 livecv_deploy.py -d gcc_standalone
65+
66+
before_deploy:
67+
- ls
68+
- ls *.tar.gz
69+
- export LIVECV_STANDALONE=$(ls *.tar.gz | tail -n +1 | head -1)
70+
- export LIVECV=$(ls *.tar.gz | tail -n +2 | head -1)
71+
- echo ${LIVECV_STANDALONE}
72+
- echo ${LIVECV}
73+
74+
deploy:
75+
provider: releases
76+
api_key:
77+
- secure: "uoyLbdtkGr8IDnyECv747iVkAsxMdqQR1v9wfwbEj4lsSHZ2E+Y3ShZMmV2AZUK86ajksBOvfMUYVo8P2JTQUsQtduu9SAIFF2MxxIVQbwmdF27cvnSUDFQjkU6h2UDNbgdi2I6rtH2g1Adhx/C45my0NQdvbhB9fEV3H+Z8g0YmoBDu3MZFGZknpf/PpNzaoGtHATo+0VooqCrAZhR9M1igGQF2ibU8z8E9xm04ehSjlMoXWv15GWmwOmkjQSe/mkeOUJ9Bl2LuIk3PcIv7uJNle5GgteQM+++iru59kZSXTLqih2peZVT7BLQ3c4gUZCtLASFPXwoQH2n4VMz4OeGv4b9LMw9bvwQ+eM8//enDDyIy2fP6KQu2BdLIScNX6B4eitxVMEcOXRHOc4xmlXqNloCOtGONaZ7w3OnwPj/O38ThM8c4riq1sh1TFBabRge8VGkBiKU3cDYPdGM2uMxST0swcrgBqu0UZ45xCftbF1tqJjs6K6ZS1v298KVlHcxyfdSJTDKCEOyTJXH6at2yYhQZ9RKrimZE5aiK0h3dsflKrmMXKDWWmQmAB7WxRQhNjEDuULvhq0f5z+oLDbL1hGSYM09196fyUDLeRY7wdYoIVaH3ebk5j6b+ar9RaQ16MoERBxR1ULUcs5gJHxCWPwyb4jRZBeMJJwzNF3Q="
78+
file_glob: true
79+
file:
80+
- "${LIVECV_STANDALONE}"
81+
- "${LIVECV}"
82+
skip_cleanup: true
83+
on:
84+
tags: true

3rdparty/opencvconfig.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ win32{
5656

5757
defineTest(deployOpenCV){
5858
copyCvDll($${OPENCV_DIR_DLLS}/opencv_world$${OPENCV_VERSION}.dll)
59+
copyCvDll($${OPENCV_DIR_DLLS}/opencv_ffmpeg$${OPENCV_VERSION_FIND}_64.dll)
5960
}
6061
}
6162

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
![Live CV](/doc/src/images/logo-dark.png)
22

33
[![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)
4+
[![Build Status](https://travis-ci.org/livecv/livecv.svg?branch=master)](https://travis-ci.org/livecv/livecv)
5+
[![Build status](https://ci.appveyor.com/api/projects/status/c1kk7crl0wiox16b?svg=true)](https://ci.appveyor.com/project/dinusv/livecv)
46

57
* **Version**: 1.3.0
68
* **License**: LGPL

application/qml/LogWindow.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@ Window {
6767
if ( logScroll.flickableItem.contentHeight > logScroll.height )
6868
logScroll.flickableItem.contentY = logScroll.flickableItem.contentHeight - logScroll.height
6969
}
70+
selectByMouse: true
7071
textFormat: Text.RichText
7172
readOnly: true
7273
font.family: "Source Code Pro, Ubuntu Mono, Courier New, Courier"
7374
font.pixelSize: 12
7475
color : "#eee"
76+
selectionColor: "#333"
7577
}
7678

7779
}

application/src/base/qlivecvlog.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,33 @@ QLiveCVLog::~QLiveCVLog(){
2828
delete m_logFile;
2929
}
3030

31-
void QLiveCVLog::logMessage(QtMsgType type, const QMessageLogContext&, const QString& msg){
31+
void QLiveCVLog::logMessage(QtMsgType type, const QMessageLogContext&, QString msg){
3232
m_logMutex.lock();
3333
switch (type){
3434
case QtInfoMsg:
3535
if ( isFileLogEnabled() )
3636
m_textStream << "Info : " << msg << "\n";
37-
m_data.append(msg + "<br/>");
37+
m_data.append(msg.replace("\n","<br/>") + "<br/>");
3838
break;
3939
case QtDebugMsg:
4040
if ( isFileLogEnabled() )
4141
m_textStream << "Debug : " << msg << "\n";
42-
m_data.append(msg + "<br/>");
42+
m_data.append(msg.replace("\n","<br/>") + "<br/>");
4343
break;
4444
case QtWarningMsg:
4545
if ( isFileLogEnabled() )
4646
m_textStream << "Warning : " << msg << "\n";
47-
m_data.append("<span style=\"color : #ffff00;\">" + msg + "</span><br/>");
47+
m_data.append("<span style=\"color : #ffff00;\">" + msg.replace("\n","<br/>") + "</span><br/>");
4848
break;
4949
case QtCriticalMsg:
5050
if ( isFileLogEnabled() )
5151
m_textStream << "Critical : " << msg;
52-
m_data.append("<span style=\"color : #cc3333;\">" + msg + "</span><br/>");
52+
m_data.append("<span style=\"color : #cc3333;\">" + msg.replace("\n","<br/>") + "</span><br/>");
5353
break;
5454
case QtFatalMsg:
5555
if ( isFileLogEnabled() )
5656
m_textStream << "Fatal : " << msg;
57-
m_data.append("<span style=\"color : #ff0000;\">" + msg + "</span><br/>");
57+
m_data.append("<span style=\"color : #ff0000;\">" + msg.replace("\n","<br/>") + "</span><br/>");
5858
break;
5959
}
6060
m_logMutex.unlock();

application/src/base/qlivecvlog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class QLiveCVLog : public QObject{
4747
void dataChanged();
4848

4949
public slots:
50-
void logMessage(QtMsgType type, const QMessageLogContext& ctx, const QString& msg);
50+
void logMessage(QtMsgType type, const QMessageLogContext& ctx, QString msg);
5151

5252
private:
5353
QString m_data;

appveyor.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
os: unstable
2+
3+
platform:
4+
- x64
5+
6+
environment:
7+
matrix:
8+
- PYTHON: "C:\\Python35"
9+
PYTHON_VERSION: "3.5.0"
10+
PYTHON_ARCH: "32"
11+
12+
install:
13+
- choco install opencv -version 3.1.0.20160701
14+
15+
before_build:
16+
- SET ARCH=x64
17+
- SET APP_PATH=%CD%
18+
- IF EXIST C:\tools\OpenCV* CD C:\tools*
19+
- SET OPENCV_ROOT_PATH=%CD%\opencv
20+
- CD %APP_PATH%
21+
- SET OPENCV_DIR=%OPENCV_ROOT_PATH%\build\%ARCH%\vc12
22+
- SET QTDIR=C:\Qt\5.7\msvc2013_64
23+
24+
build_script:
25+
- cd build
26+
- echo %OPENCV_DIR%
27+
- echo %QTDIR%
28+
- ps: $file = "$pwd\deploy.zip"
29+
- ps: (new-object System.Net.WebClient).Downloadfile("https://github.com/livecv/livecv-deploy-kit/archive/master.zip", $file)
30+
- ps: 7z x -y $file -o"."
31+
- SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
32+
- mv livecv-deploy-kit-master/* .
33+
- python --version
34+
- python livecv_build.py -b 64
35+
- python livecv_deploy.py -b 64
36+
- dir
37+
38+
artifacts:
39+
- path: 'build\livecv-*.zip'
40+
name: Release
41+
42+
deploy:
43+
release: $(APPVEYOR_REPO_TAG_NAME)
44+
description: 'View Changelog.md for further details.'
45+
provider: GitHub
46+
auth_token:
47+
secure: 'ewCMPMl6d/IVBZ0r/ZApqeh0NgF/0UMMtKTqvQcmTNFb3uK57XFyqbZBHLDICAVC'
48+
artifact: /.*\.zip/
49+
draft: true
50+
prerelease: false
51+
on:
52+
branch: master # release from master branch only
53+
appveyor_repo_tag: true
54+
55+

editor/lcveditor/src/qdocumentcodeinterface.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ void QDocumentCodeInterface::setDocument(QProjectDocument *document){
105105

106106
void QDocumentCodeInterface::generateCompletion(int cursorPosition){
107107
if ( m_target && m_codeHandler ){
108+
m_lastChar = QChar();
108109
QTextCursor cursor(m_target->textDocument());
109110
cursor.setPosition(cursorPosition);
110111
QTextCursor newCursor;

editor/qmljsparser/src/qdocumentqmlhandler.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,12 @@ void QDocumentQmlHandler::assistCompletion(
672672
model->setSuggestions(suggestions, filter);
673673
}
674674
} else if ( ctx->context() & QQmlCompletionContext::InImport ){
675-
suggestionsForImport(*ctx, suggestions);
676-
model->setSuggestions(suggestions, filter);
675+
if ( ctx->context() & QQmlCompletionContext::InImportVersion ){
676+
model->setSuggestions(suggestions, filter);
677+
} else {
678+
suggestionsForImport(*ctx, suggestions);
679+
model->setSuggestions(suggestions, filter);
680+
}
677681
} else if ( ctx->context() & QQmlCompletionContext::InAfterOnLhsOfBinding ){
678682
suggestionsForLeftSignalBind(*ctx, cursor.position(), suggestions);
679683
model->setSuggestions(suggestions, filter);

editor/qmljsparser/src/qprojectqmlscope.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ void QProjectQmlScope::findQmlLibraryInImports(
7777
versionMinor,
7878
newPaths
7979
);
80+
if ( !newPaths.isEmpty() ) // avoid duplicates in multiple import paths
81+
break;
8082
}
8183

8284
if ( !newPaths.isEmpty() )

0 commit comments

Comments
 (0)