Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
6c4319b0
Commit
6c4319b0
authored
Mar 03, 2021
by
Adrian Georgescu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added workaround for getting unit testing working during debuild
parent
6ceff169
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
resources.py
blink/resources.py
+7
-1
No files found.
blink/resources.py
View file @
6c4319b0
...
...
@@ -6,6 +6,7 @@ import imghdr
import
os
import
platform
import
sys
import
pathlib
from
PyQt5.QtCore
import
Qt
,
QBuffer
from
PyQt5.QtGui
import
QIcon
,
QPixmap
...
...
@@ -60,6 +61,7 @@ class Resources(object):
@
classproperty
def
directory
(
cls
):
if
cls
.
_cached_directory
is
None
:
parent_dir
=
pathlib
.
Path
(
__file__
)
.
parent
.
absolute
()
try
:
binary_directory
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__main__
.
__file__
))
except
AttributeError
:
...
...
@@ -72,7 +74,11 @@ class Resources(object):
application_directory
=
os
.
path
.
dirname
(
binary_directory
)
else
:
application_directory
=
binary_directory
if
os
.
path
.
exists
(
os
.
path
.
join
(
application_directory
,
'resources'
,
'blink.ui'
)):
unit_test_dir
=
'
%
s/../../../../resources'
%
parent_dir
if
os
.
path
.
exists
(
os
.
path
.
join
(
unit_test_dir
,
'blink.ui'
)):
# this is to make happy the self unit-testing, there must be a better way -adi
cls
.
_cached_directory
=
unit_test_dir
elif
os
.
path
.
exists
(
os
.
path
.
join
(
application_directory
,
'resources'
,
'blink.ui'
)):
cls
.
_cached_directory
=
os
.
path
.
join
(
application_directory
,
'resources'
)
else
:
cls
.
_cached_directory
=
os
.
path
.
join
(
application_directory
,
'share'
,
'blink'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment