You are not logged in.

  • "impeteperry" is male
  • "impeteperry" started this thread

Posts: 110

Location: Rhode Island, USA

Occupation: self un-employied

  • Send private message

1

Thursday, October 21st 2004, 5:03pm

SIGNAL - SLOT connection problem

I have

Quoted

connect( this, SIGNAL( userInputEntered( long int, QString, int ) ), supports, SLOT( slotInputEntered( long int, QString, int ) ) );

If the "long int" = 13203 the connection works, but if the "long int" = 130203 it does not work. No warning or error messages. The SLOT is

Quoted

void SupportLines::slotInputEntered( long int function, QString text, int number )

I thought a long int could be greater then 32768. My C++ book says it can be up to 2147483647 if signed. Am I crazy?

Thanks in advance.
a helping hand has more than five fingers

serg

Beginner

  • "serg" is male

Posts: 32

Location: Russia, Moscow

Occupation: Programmer

  • Send private message

2

Thursday, October 21st 2004, 5:24pm

RE: SIGNAL - SLOT connection problem

Try replace QString on const QString&

Posts: 2,162

Location: Graz, Austria

Occupation: Student

  • Send private message

3

Thursday, October 21st 2004, 6:08pm

RE: SIGNAL - SLOT connection problem

Quoted

Originally posted by impeteperry
I thought a long int could be greater then 32768. My C++ book says it can be up to 2147483647 if signed. Am I crazy?


Usually even int has that range.

Cheers,
_
Qt/KDE Developer
Debian User

  • "wysota" is male

Posts: 4,276

Location: Warsaw, POLAND

  • Send private message

4

Thursday, October 21st 2004, 7:52pm

RE: SIGNAL - SLOT connection problem

long int is equal to int on most 32bit platforms (32b). Use long long to get 64 bit integers :)

  • "impeteperry" is male
  • "impeteperry" started this thread

Posts: 110

Location: Rhode Island, USA

Occupation: self un-employied

  • Send private message

5

Friday, October 22nd 2004, 3:19am

RE: SIGNAL - SLOT connection problem

Thanks for the replies, I gather it should work with ether ints or longs so somthing else is causing the problem. serg may have the answer. The string is screwing up the long integer somehow. I don't know why I am not passing pointers is the first place. You all have gives me enough to work on. It will be a day or twe before I post my results.

Thanks to all.
a helping hand has more than five fingers