Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F630324
CloneDialog.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
974 B
Referenced Files
None
Subscribers
None
CloneDialog.cpp
View Options
#include
"CloneDialog.h"
#include
"ui_CloneDialog.h"
#include
"misc.h"
#include
"joinpath.h"
CloneDialog
::
CloneDialog
(
QWidget
*
parent
,
GitPtr
gitptr
,
const
QString
&
defworkdir
)
:
QDialog
(
parent
),
ui
(
new
Ui
::
CloneDialog
)
{
ui
->
setupUi
(
this
);
git
=
gitptr
;
default_working_dir
=
defworkdir
;
ui
->
lineEdit_working_dir
->
setText
(
default_working_dir
);
}
CloneDialog
::~
CloneDialog
()
{
delete
ui
;
}
void
CloneDialog
::
accept
()
{
QString
loc
=
ui
->
lineEdit_repo_location
->
text
();
QString
dir
=
ui
->
lineEdit_working_dir
->
text
();
git
->
clone
(
loc
,
dir
);
}
void
CloneDialog
::
on_lineEdit_repo_location_textChanged
(
const
QString
&
text
)
{
QString
path
;
int
i
=
text
.
lastIndexOf
(
'/'
);
int
j
=
text
.
lastIndexOf
(
'\\'
);
if
(
i
<
j
)
i
=
j
;
j
=
text
.
size
();
if
(
text
.
endsWith
(
".git"
))
{
j
-=
4
;
}
if
(
i
>=
0
&&
i
<
j
)
{
path
=
text
.
mid
(
i
,
j
-
i
);
}
path
=
default_working_dir
/
path
;
path
=
misc
::
normalizePathSeparator
(
path
);
ui
->
lineEdit_working_dir
->
setText
(
path
);
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, Nov 15, 9:13 AM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
134932
Default Alt Text
CloneDialog.cpp (974 B)
Attached To
Mode
R77 Guitar
Attached
Detach File
Event Timeline