Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
glacier-home
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
NemoMobile
glacier-home
Commits
ab5bb3aa
Commit
ab5bb3aa
authored
Oct 24, 2017
by
m2ko
Committed by
eekkelund
Feb 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Latest tries
parent
05dfe712
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
48 deletions
+35
-48
glacierauthenticationinput.cpp
src/glacierauthenticationinput.cpp
+0
-7
glacierauthenticationinput.h
src/glacierauthenticationinput.h
+0
-15
main.cpp
src/main.cpp
+0
-2
DeviceLockUI.qml
src/qml/DeviceLockUI.qml
+18
-15
Lockscreen.qml
src/qml/Lockscreen.qml
+15
-4
src.pro
src/src.pro
+2
-5
No files found.
src/glacierauthenticationinput.cpp
deleted
100644 → 0
View file @
05dfe712
#include "glacierauthenticationinput.h"
/*GlacierAuthenticationInput::GlacierAuthenticationInput()
{
}
*/
src/glacierauthenticationinput.h
deleted
100644 → 0
View file @
05dfe712
#ifndef GLACIERAUTHENTICATIONINPUT_H
#define GLACIERAUTHENTICATIONINPUT_H
#include <nemo-devicelock/authenticationinput.h>
class
GlacierAuthenticationInput
:
public
NemoDeviceLock
::
AuthenticationInput
{
Q_OBJECT
public:
explicit
GlacierAuthenticationInput
(
QObject
*
parent
=
nullptr
)
:
NemoDeviceLock
::
AuthenticationInput
(
DeviceLock
,
parent
)
{
}
};
#endif // GLACIERAUTHENTICATIONINPUT_H
src/main.cpp
View file @
ab5bb3aa
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#include <QQmlContext>
#include <QQmlContext>
#include "glacierwindowmodel.h"
#include "glacierwindowmodel.h"
#include <QScreen>
#include <QScreen>
#include "glacierauthenticationinput.h"
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
...
@@ -62,7 +61,6 @@ int main(int argc, char **argv)
...
@@ -62,7 +61,6 @@ int main(int argc, char **argv)
nativeOrientation
=
app
.
primaryScreen
()
->
primaryOrientation
();
nativeOrientation
=
app
.
primaryScreen
()
->
primaryOrientation
();
app
.
engine
()
->
rootContext
()
->
setContextProperty
(
"nativeOrientation"
,
nativeOrientation
);
app
.
engine
()
->
rootContext
()
->
setContextProperty
(
"nativeOrientation"
,
nativeOrientation
);
qmlRegisterType
<
GlacierWindowModel
>
(
"org.nemomobile.glacier"
,
1
,
0
,
"GlacierWindowModel"
);
qmlRegisterType
<
GlacierWindowModel
>
(
"org.nemomobile.glacier"
,
1
,
0
,
"GlacierWindowModel"
);
qmlRegisterType
<
GlacierAuthenticationInput
>
(
"org.nemomobile.glacierauthentication"
,
1
,
0
,
"GlacierAuthenticationInput"
);
app
.
setQmlPath
(
"/usr/share/lipstick-glacier-home-qt5/qml/MainScreen.qml"
);
app
.
setQmlPath
(
"/usr/share/lipstick-glacier-home-qt5/qml/MainScreen.qml"
);
// Give these to the environment inside the lipstick homescreen
// Give these to the environment inside the lipstick homescreen
// Fixes a bug where some applications wouldn't launch, eg. terminal or browser
// Fixes a bug where some applications wouldn't launch, eg. terminal or browser
...
...
src/qml/DeviceLockUI.qml
View file @
ab5bb3aa
...
@@ -4,9 +4,9 @@ import QtQuick.Controls.Nemo 1.0
...
@@ -4,9 +4,9 @@ import QtQuick.Controls.Nemo 1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
import
QtQuick
.
Layouts
1.0
import
QtQuick
.
Layouts
1.0
import
org
.
nemomobile
.
glacierauthentication
1.0
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
devicelock
1.0
import
org
.
nemomobile
.
devicelock
1.0
import
org
.
nemomobile
.
dbus
1.0
import
"
scripts/desktop.js
"
as
Desktop
import
"
scripts/desktop.js
"
as
Desktop
...
@@ -20,7 +20,7 @@ Item {
...
@@ -20,7 +20,7 @@ Item {
onShouldAuthenticateChanged
:
{
onShouldAuthenticateChanged
:
{
if
(
shouldAuthenticate
)
{
if
(
shouldAuthenticate
)
{
//console.log("Requesting security code "
+ authenticationInput.status)
console
.
log
(
"
Requesting security code
"
+
JSON
.
stringify
(
authenticationInput
))
//
+ authenticationInput.status)
//authenticationInput.requestSecurityCode()
//authenticationInput.requestSecurityCode()
//DeviceLock.authorization.requestChallenge()
//DeviceLock.authorization.requestChallenge()
}
else
{
}
else
{
...
@@ -42,18 +42,20 @@ Item {
...
@@ -42,18 +42,20 @@ Item {
DeviceLock.authorization.allowedMethods)
DeviceLock.authorization.allowedMethods)
}
}
}*/
}*/
/*authenticationInput.onAuthenticationUnavailable: {
Authenticator
{
console.log("Authentication unavailable: "+error)
id
:
auth
Component.onCompleted
:
{
console
.
log
(
"
Requesting challenge
"
)
Authorization
.
requestChallege
()
}
}
authenticationInput.onFeedback: {
onAuthenticated
:
{
console.log("Feedback: "+feedback)
console
.
log
(
"
Authenticated:
"
+
DeviceLock
.
state
)
}
}
authenticationInput.onAuthenticationStarted: {
console.log("Authentication started")
}
}
authenticationInput.onAuthenticationEnded: {
console.log("Ended "+confirmed)
}*/
ColumnLayout
{
ColumnLayout
{
anchors.fill
:
parent
anchors.fill
:
parent
...
@@ -108,11 +110,12 @@ Item {
...
@@ -108,11 +110,12 @@ Item {
if
(
numLabel
.
text
!==
"
Ca
"
&&
numLabel
.
text
!==
"
OK
"
)
{
if
(
numLabel
.
text
!==
"
Ca
"
&&
numLabel
.
text
!==
"
OK
"
)
{
//console.log(authenticationInput.Status)
//console.log(authenticationInput.Status)
lockCodeField
.
insert
(
lockCodeField
.
cursorPosition
,
numLabel
.
text
)
lockCodeField
.
insert
(
lockCodeField
.
cursorPosition
,
numLabel
.
text
)
authenticationInput
.
requestSecurityCode
()
}
else
{
}
else
{
if
(
numLabel
.
text
===
"
OK
"
)
{
if
(
numLabel
.
text
===
"
OK
"
)
{
console
.
log
(
"
DeviceLockUI:
"
+
auth
.
availableMethods
)
console
.
log
(
"
DeviceLockUI:
"
+
JSON
.
stringify
(
authenticationInput
)
)
auth
.
authenticate
(
Authorization
.
challengeCode
,
auth
.
availableMethods
)
//
auth.authenticate(Authorization.challengeCode, auth.availableMethods)
//
authenticationInput.enterSecurityCode(lockCodeField.text)
authenticationInput
.
enterSecurityCode
(
lockCodeField
.
text
)
//codeEntered(lockCodeField.text)
//codeEntered(lockCodeField.text)
lockCodeField
.
text
=
""
lockCodeField
.
text
=
""
}
else
if
(
numLabel
.
text
===
"
Ca
"
){
}
else
if
(
numLabel
.
text
===
"
Ca
"
){
...
...
src/qml/Lockscreen.qml
View file @
ab5bb3aa
...
@@ -3,7 +3,6 @@ import QtQuick 2.6
...
@@ -3,7 +3,6 @@ import QtQuick 2.6
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
lipstick
0.1
import
org
.
nemomobile
.
devicelock
1.0
import
org
.
nemomobile
.
devicelock
1.0
import
org
.
nemomobile
.
configuration
1.0
import
org
.
nemomobile
.
configuration
1.0
import
org
.
nemomobile
.
glacierauthentication
1.0
import
"
notifications
"
import
"
notifications
"
...
@@ -185,15 +184,27 @@ Image {
...
@@ -185,15 +184,27 @@ Image {
console
.
log
(
"
Security code entered:
"
+
authenticationInput
.
minimumCodeLength
)
console
.
log
(
"
Security code entered:
"
+
authenticationInput
.
minimumCodeLength
)
}
}
authenticationInput
:
GlacierAuthenticationInput
{
authenticationInput
:
DeviceLockAuthenticationInput
{
property
bool
unlocked
:
DeviceLock
.
state
>=
DeviceLock
.
Locked
//property bool unlocked: DeviceLock.state >= DeviceLock.Locked
readonly
property
bool
unlocking
:
registered
&&
DeviceLock
.
state
>=
DeviceLock
.
Locked
&&
DeviceLock
.
state
<
DeviceLock
.
Undefined
registered
:
true
registered
:
true
active
:
true
//active: lockscreenVisible()
//active: lockscreenVisible()
onUnlockedChanged
:
console
.
log
(
"
Unlock
"
)
//
onUnlockedChanged: console.log("Unlock")
onStatusChanged
:
{
onStatusChanged
:
{
console
.
log
(
"
Status changed
"
)
console
.
log
(
"
Status changed
"
)
}
}
onUnlockingChanged
:
{
console
.
log
(
"
Unlock
"
)
if
(
unlocking
)
{
DeviceLock
.
unlock
()
}
else
{
DeviceLock
.
cancel
()
}
}
onAuthenticationUnavailable
:
{
onAuthenticationUnavailable
:
{
console
.
log
(
"
Authentication unavailable:
"
+
error
)
console
.
log
(
"
Authentication unavailable:
"
+
error
)
}
}
...
...
src/src.pro
View file @
ab5bb3aa
...
@@ -99,17 +99,14 @@ CONFIG += qt link_pkgconfig
...
@@ -99,17 +99,14 @@ CONFIG += qt link_pkgconfig
QT += quick compositor
QT += quick compositor
DEFINES += QT_COMPOSITOR_QUICK
DEFINES += QT_COMPOSITOR_QUICK
HEADERS += \
HEADERS += \
glacierwindowmodel.h \
glacierwindowmodel.h
glacierauthenticationinput.h
QT += dbus
QT += dbus
LIBS += -lnemodevicelock
LIBS += -lnemodevicelock
MOC_DIR = .moc
MOC_DIR = .moc
SOURCES += \
SOURCES += \
main.cpp \
main.cpp \
glacierwindowmodel.cpp \
glacierwindowmodel.cpp
glacierauthenticationinput.cpp
PKGCONFIG += lipstick-qt5 \
PKGCONFIG += lipstick-qt5 \
nemodevicelock
nemodevicelock
...
...
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