Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
573624a4
Verified
Commit
573624a4
authored
3 years ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Remove some unused functions
parent
4a80fdc9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/ChatPage.cpp
+2
-0
2 additions, 0 deletions
src/ChatPage.cpp
src/MainWindow.cpp
+0
-41
0 additions, 41 deletions
src/MainWindow.cpp
src/MainWindow.h
+0
-12
0 additions, 12 deletions
src/MainWindow.h
with
2 additions
and
53 deletions
src/ChatPage.cpp
+
2
−
0
View file @
573624a4
...
@@ -777,6 +777,8 @@ ChatPage::inviteUser(QString userid, QString reason)
...
@@ -777,6 +777,8 @@ ChatPage::inviteUser(QString userid, QString reason)
userid
.
toStdString
(),
userid
.
toStdString
(),
[
this
,
userid
,
room
](
const
mtx
::
responses
::
Empty
&
,
mtx
::
http
::
RequestErr
err
)
{
[
this
,
userid
,
room
](
const
mtx
::
responses
::
Empty
&
,
mtx
::
http
::
RequestErr
err
)
{
if
(
err
)
{
if
(
err
)
{
nhlog
::
net
()
->
error
(
"Failed to invite {} to {}: {}"
,
userid
.
toStdString
(),
room
.
toStdString
(),
*
err
);
emit
showNotification
(
emit
showNotification
(
tr
(
"Failed to invite %1 to %2: %3"
)
tr
(
"Failed to invite %1 to %2: %3"
)
.
arg
(
userid
,
room
,
QString
::
fromStdString
(
err
->
matrix_error
.
error
)));
.
arg
(
userid
,
room
,
QString
::
fromStdString
(
err
->
matrix_error
.
error
)));
...
...
This diff is collapsed.
Click to expand it.
src/MainWindow.cpp
+
0
−
41
View file @
573624a4
...
@@ -357,23 +357,6 @@ MainWindow::saveCurrentWindowSize()
...
@@ -357,23 +357,6 @@ MainWindow::saveCurrentWindowSize()
settings
->
setValue
(
QStringLiteral
(
"window/height"
),
current
.
height
());
settings
->
setValue
(
QStringLiteral
(
"window/height"
),
current
.
height
());
}
}
void
MainWindow
::
removeOverlayProgressBar
()
{
QTimer
*
timer
=
new
QTimer
(
this
);
timer
->
setSingleShot
(
true
);
connect
(
timer
,
&
QTimer
::
timeout
,
this
,
[
this
,
timer
]()
{
timer
->
deleteLater
();
});
// FIXME: Snackbar doesn't work if it's initialized in the constructor.
// QTimer::singleShot(0, this, [this]() {
// snackBar_ = new SnackBar(this);
// connect(chat_page_, &ChatPage::showNotification, snackBar_, &SnackBar::showMessage);
//});
timer
->
start
(
50
);
}
void
void
MainWindow
::
showChatPage
()
MainWindow
::
showChatPage
()
{
{
...
@@ -388,8 +371,6 @@ MainWindow::showChatPage()
...
@@ -388,8 +371,6 @@ MainWindow::showChatPage()
userSettings_
.
data
()
->
setDeviceId
(
device_id
);
userSettings_
.
data
()
->
setDeviceId
(
device_id
);
userSettings_
.
data
()
->
setHomeserver
(
homeserver
);
userSettings_
.
data
()
->
setHomeserver
(
homeserver
);
showOverlayProgressBar
();
chat_page_
->
bootstrap
(
userid
,
homeserver
,
token
);
chat_page_
->
bootstrap
(
userid
,
homeserver
,
token
);
connect
(
cache
::
client
(),
&
Cache
::
databaseReady
,
this
,
&
MainWindow
::
secretsChanged
);
connect
(
cache
::
client
(),
&
Cache
::
databaseReady
,
this
,
&
MainWindow
::
secretsChanged
);
connect
(
cache
::
client
(),
&
Cache
::
secretChanged
,
this
,
&
MainWindow
::
secretsChanged
);
connect
(
cache
::
client
(),
&
Cache
::
secretChanged
,
this
,
&
MainWindow
::
secretsChanged
);
...
@@ -446,10 +427,6 @@ MainWindow::hasActiveUser()
...
@@ -446,10 +427,6 @@ MainWindow::hasActiveUser()
settings
->
contains
(
prefix
+
"auth/user_id"
);
settings
->
contains
(
prefix
+
"auth/user_id"
);
}
}
void
MainWindow
::
showOverlayProgressBar
()
{}
void
void
MainWindow
::
openCreateRoomDialog
(
MainWindow
::
openCreateRoomDialog
(
std
::
function
<
void
(
const
mtx
::
requests
::
CreateRoom
&
request
)
>
callback
)
std
::
function
<
void
(
const
mtx
::
requests
::
CreateRoom
&
request
)
>
callback
)
...
@@ -463,14 +440,6 @@ MainWindow::openCreateRoomDialog(
...
@@ -463,14 +440,6 @@ MainWindow::openCreateRoomDialog(
showDialog
(
dialog
);
showDialog
(
dialog
);
}
}
void
MainWindow
::
showTransparentOverlayModal
(
QWidget
*
,
QFlags
<
Qt
::
AlignmentFlag
>
)
{}
void
MainWindow
::
showSolidOverlayModal
(
QWidget
*
,
QFlags
<
Qt
::
AlignmentFlag
>
)
{}
bool
bool
MainWindow
::
hasActiveDialogs
()
const
MainWindow
::
hasActiveDialogs
()
const
{
{
...
@@ -484,10 +453,6 @@ MainWindow::pageSupportsTray() const
...
@@ -484,10 +453,6 @@ MainWindow::pageSupportsTray() const
//! !register_page_->isVisible();
//! !register_page_->isVisible();
}
}
void
MainWindow
::
hideOverlay
()
{}
inline
void
inline
void
MainWindow
::
showDialog
(
QWidget
*
dialog
)
MainWindow
::
showDialog
(
QWidget
*
dialog
)
{
{
...
@@ -496,12 +461,6 @@ MainWindow::showDialog(QWidget *dialog)
...
@@ -496,12 +461,6 @@ MainWindow::showDialog(QWidget *dialog)
dialog
->
show
();
dialog
->
show
();
}
}
void
MainWindow
::
showWelcomePage
()
{
removeOverlayProgressBar
();
}
void
void
MainWindow
::
showRegisterPage
()
MainWindow
::
showRegisterPage
()
{}
{}
This diff is collapsed.
Click to expand it.
src/MainWindow.h
+
0
−
12
View file @
573624a4
...
@@ -56,12 +56,6 @@ public:
...
@@ -56,12 +56,6 @@ public:
openCreateRoomDialog
(
std
::
function
<
void
(
const
mtx
::
requests
::
CreateRoom
&
request
)
>
callback
);
openCreateRoomDialog
(
std
::
function
<
void
(
const
mtx
::
requests
::
CreateRoom
&
request
)
>
callback
);
void
openJoinRoomDialog
(
std
::
function
<
void
(
const
QString
&
room_id
)
>
callback
);
void
openJoinRoomDialog
(
std
::
function
<
void
(
const
QString
&
room_id
)
>
callback
);
void
hideOverlay
();
void
showSolidOverlayModal
(
QWidget
*
content
,
QFlags
<
Qt
::
AlignmentFlag
>
flags
=
Qt
::
AlignCenter
);
void
showTransparentOverlayModal
(
QWidget
*
content
,
QFlags
<
Qt
::
AlignmentFlag
>
flags
=
Qt
::
AlignTop
|
Qt
::
AlignHCenter
);
MxcImageProvider
*
imageProvider
()
{
return
imgProvider
;
}
MxcImageProvider
*
imageProvider
()
{
return
imgProvider
;
}
//! Show the chat page and start communicating with the given access token.
//! Show the chat page and start communicating with the given access token.
...
@@ -75,15 +69,9 @@ private slots:
...
@@ -75,15 +69,9 @@ private slots:
//! Handle interaction with the tray icon.
//! Handle interaction with the tray icon.
void
iconActivated
(
QSystemTrayIcon
::
ActivationReason
reason
);
void
iconActivated
(
QSystemTrayIcon
::
ActivationReason
reason
);
//! Show the welcome page in the main window.
void
showWelcomePage
();
//! Show the register page in the main window.
//! Show the register page in the main window.
void
showRegisterPage
();
void
showRegisterPage
();
void
showOverlayProgressBar
();
void
removeOverlayProgressBar
();
virtual
void
setWindowTitle
(
int
notificationCount
);
virtual
void
setWindowTitle
(
int
notificationCount
);
signals
:
signals
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment