Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Tobias Hunger
qt-creator
Commits
cbee2297
Commit
cbee2297
authored
15 years ago
by
Daniel Molkentin
Browse files
Options
Downloads
Patches
Plain Diff
docs: Compile Fixes, Fixups in addressbook example
Reviewed-By: TrustMe
parent
9a089680
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/examples/addressbook-sdk/part6/addressbook.cpp
+9
-1
9 additions, 1 deletion
doc/examples/addressbook-sdk/part6/addressbook.cpp
doc/examples/addressbook-sdk/part7/addressbook.cpp
+4
-1
4 additions, 1 deletion
doc/examples/addressbook-sdk/part7/addressbook.cpp
with
13 additions
and
2 deletions
doc/examples/addressbook-sdk/part6/addressbook.cpp
+
9
−
1
View file @
cbee2297
#include
<QFileDialog>
#include
"addressbook.h"
#include
"addressbook.h"
#include
"ui_addressbook.h"
#include
"ui_addressbook.h"
...
@@ -31,6 +33,12 @@ AddressBook::AddressBook(QWidget *parent)
...
@@ -31,6 +33,12 @@ AddressBook::AddressBook(QWidget *parent)
SLOT
(
removeContact
()));
SLOT
(
removeContact
()));
connect
(
ui
->
findButton
,
SIGNAL
(
clicked
()),
this
,
connect
(
ui
->
findButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
findContact
()));
SLOT
(
findContact
()));
//! [connectSlots]
connect
(
ui
->
loadButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
loadFromFile
()));
connect
(
ui
->
saveButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
saveToFile
()));
//! [connectSlots]
setWindowTitle
(
tr
(
"Simple Address Book"
));
setWindowTitle
(
tr
(
"Simple Address Book"
));
}
}
...
@@ -292,7 +300,7 @@ void AddressBook::loadFromFile()
...
@@ -292,7 +300,7 @@ void AddressBook::loadFromFile()
//! [loadFromFile part3]
//! [loadFromFile part3]
if
(
contacts
.
isEmpty
())
{
if
(
contacts
.
isEmpty
())
{
QMessage
b
ox
::
information
(
this
,
tr
(
"No contacts in file"
),
QMessage
B
ox
::
information
(
this
,
tr
(
"No contacts in file"
),
tr
(
"The file you are attempting to open contains no contacts."
));
tr
(
"The file you are attempting to open contains no contacts."
));
}
else
{
}
else
{
QMap
<
QString
,
QString
>::
iterator
i
=
contacts
.
begin
();
QMap
<
QString
,
QString
>::
iterator
i
=
contacts
.
begin
();
...
...
This diff is collapsed.
Click to expand it.
doc/examples/addressbook-sdk/part7/addressbook.cpp
+
4
−
1
View file @
cbee2297
#include
<QFileDialog>
#include
<QTextStream>
#include
"addressbook.h"
#include
"addressbook.h"
#include
"ui_addressbook.h"
#include
"ui_addressbook.h"
...
@@ -348,5 +351,5 @@ void AddressBook::exportAsVCard()
...
@@ -348,5 +351,5 @@ void AddressBook::exportAsVCard()
out
<<
"END;VCARD"
<<
"
\n
"
;
out
<<
"END;VCARD"
<<
"
\n
"
;
QMessageBox
::
information
(
this
,
tr
(
"Export Successful"
),
QMessageBox
::
information
(
this
,
tr
(
"Export Successful"
),
tr
(
"\%1
\"
has been exported as a vCard."
).
arg
(
name
));
tr
(
"
\
"
%1
\"
has been exported as a vCard."
).
arg
(
name
));
}
}
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